wa0x6e / Cake-Resque

Resque plugin for CakePHP : for creating background jobs that can be processed offline later
MIT License
159 stars 56 forks source link

Recommendations for process monitoring/auto-restart ? #34

Closed andreasklinger closed 10 years ago

andreasklinger commented 10 years ago

Sorry to bother with an issue, but Google keeps me hanging on this.

Do you have any recommendation which process monitoring tool we should use to make sure the watchers are always running/restarted?

If you could also provide an example configuration this would be even better.

wa0x6e commented 10 years ago

I've never used one, but monit seems to be popular

andreasklinger commented 10 years ago

Understandable. But how do you handle dying worker processes? Or is this not needed?

wa0x6e commented 10 years ago

It's handled by monit, it's his job. It's monitoring the PID files

amiri27 commented 10 years ago

Hi kamisama..

We have the same problem.. Could you please provide any example how to setup monit!? also can we integrate resqueboard to CakeResque ?!

Regards,

wa0x6e commented 10 years ago

Sorry, I've never used Monit, so I can't help on that point.

For the ResqueBoard integration, in your config file, set

amiri27 commented 10 years ago

Hi Kamisama,

May I know that how do you monitor your queue workers from getting stopped by OS? Also how do you set them to autostart when you restart your system!? Do you have any solution for that or it should be done manually?

Regards,

phronesis commented 10 years ago

I think this is a very important issue because it's usually embarrassing to realize that mails(When using CakeResque to send mails in the background) are not going out because workers have been stopped. So how do we monitor it and possibly restart. Any ideas? Thanks

wa0x6e commented 10 years ago

You can use God or Monit

phronesis commented 10 years ago

Thank you. I'm already looking at monit and upstart On 26 Feb 2014 08:53, "Wan Qi Chen" notifications@github.com wrote:

You can use God or Monit

Reply to this email directly or view it on GitHubhttps://github.com/kamisama/Cake-Resque/issues/34#issuecomment-36099537 .

bcbirkhauser commented 10 years ago

I'm trying to set up Monit but can't seem to get a pid file that is generated from CakeResque. I've looked in the code to see where it's supposed to be putting the pid file, but it's not there. Any ideas?

wa0x6e commented 10 years ago

Configure::read('CakeResque.Resque.tmpdir') to get the temp folder.

bcbirkhauser commented 10 years ago

I found that, but it doesn't seem to be creating the PID file in that directory, or anywhere for that matter.

wa0x6e commented 10 years ago

Does the user starting the workers has permission to write in that folder ?