running multiple instances of memcached

SUSE 11 sp3 for vmware.

I have successfully installed a configured a single instance of memcached but I want to run multiple. I attempted to run a second instance by copying the init.d and conf files and renaming them. So instance 1 is memcached & the second instance is memcached2, with their own service & config files. I specified a different port to listen on, a different pid file, and made the changes in the init.d script to use the memcached2.conf files. I can get each service to run successfully alone but not together.

I just can’t seem to find the conflict, any ides ?

Thanks

Any errors printed out when trying both at the same time? Tried running
strace against the actual binary with all of its parameters and
environment variable setup to see if any failures show up there?

Out of curiosity, what does memcached give you when running multiple
times? I’ve never tinkered with it, so interested in others’ experiences
here.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…

I did figured it out, but it didn’t give me any errors anywhere which was frustrating. Lots of trial and error.

It turned out that I didn’t have the separate pid files set correctly. I had to modify both init.d scripts and added PID=/var/run/ then added the -p $PID option to the startproc, killproc, and checkproc commands through out the script.

Just for consistency sake added -P to the memcached parameters in the conf file in /etc/sysconfig

Thanks for your help.