how to run 2 instance of memcached from rc.conf?

Glenn Dawson glenn at
Wed Jul 27 06:47:12 GMT 2005

At 11:16 PM 7/26/2005, Lei Sun wrote:
>I am trying to run 2 instance of memcached from rc.conf, but whenever
>I try to start it the second time, it tells me that the instance is
>already running.
>Please help...

According to the documentation at running 
more than one instance on the same machine is only helpful if you have more 
than 4GB of RAM.

To load another instance, you just have to tell it to listen on a different 
port, or a different IP address (if the machine you're running it one has 
more than one IP).


>my rc.conf
>ifconfig_em0="inet  netmask"
>memcached_flags="-m 1024 -l -p 11211"
>my /usr/local/etc/rc.d/
># PROVIDE: memcached
># Add the following lines to /etc/rc.conf to run memcached:
># memcached_enable="YES"
># memcached_flags=""
>. /etc/rc.subr
>command_args="-du nobody ${memcached_flags}"
>load_rc_config $name
>run_rc_command "$1"
>freebsd-questions at mailing list
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list