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:

  1. log in amazon ec2 via ssh , navigate app/current folder
  2. i run command lsof -i :9292 show processes runs in port 9292.
  3. i run command tmux kill-session -t faye stop faye
  4. i pid number , run command kill pid_num kill process runs in port 9292.

after that, create new faye process:

  1. in same directory, run command tmux new -s faye
  2. i write rails_env=production rackup private_pub.ru -o 0.0.0.0 -s thin -p 9292 -e production , press enter
  3. i press ctrl + b , after press d 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

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -