ruby on rails - How to automatically restart (cronjob) the FAYE process in Ubuntu? -
i have app runs faye on ubuntu server. faye works fine, after days, runs slowly. way know manually kill faye process , create again. this:
- log in amazon ec2 via ssh , navigate
app/current
folder - i run command
lsof -i :9292
show processes runs in port 9292. - i run command
tmux kill-session -t faye
stop faye - i pid number , run command
kill pid_num
kill process runs in port 9292.
after that, create new faye process:
- in same directory, run command
tmux new -s faye
- i write
rails_env=production rackup private_pub.ru -o 0.0.0.0 -s thin -p 9292 -e production
, press enter - i press
ctrl + b
, after pressd
detach
then, faye fast again.
i need way via cronjob. automatically way. way restart faye process or commands above in specific period (probably weekly).
other solutions welcome.
my environment info
os: ubuntu 14.04.2 lts (gnu/linux 3.13.0-48-generic x86_64) ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] rails -v: 4.2.3 faye (1.2.4) faye-websocket (0.10.7)
Comments
Post a Comment