Capistrano fails to restart Memcached service

Hi.

I am using Capistrano for my webapp and after deploy I need to restart
memcached service. I am trying to do it with

sudo “/etc/init.d/memcached restart”

But it does not do it, even if memcached service existed - after
deployment memcached service is off.

I did some researching and added

run “sleep 40”

right after sudo command and found that service process existed and
memcached service started.

But it killed when SSH Capistrano finishes.

What could be reason of this strange behaviour? I thought services
processes work independently from Capistrano SSH session. How to solve
my problem??

My environment: Ubuntu Breezy, latest Capistrano.

What could be reason of this strange behaviour? I thought services
processes work independently from Capistrano SSH session. How to solve
my problem??

Try:

sudo “nohup /etc/init.d/memcached restart &”

Zsombor

Thanks a lot, Zsombor. It does a trick.

Anatol P. wrote:

right after sudo command and found that service process existed and
memcached service started.

But it killed when SSH Capistrano finishes.

What could be reason of this strange behaviour? I thought services
processes work independently from Capistrano SSH session. How to solve
my problem??

Try:

sudo “nohup /etc/init.d/memcached restart &”

Zsombor


Company - http://primalgrasp.com
Thoughts - http://deezsombor.blogspot.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs