Mike Orr wrote: > I'm about to deploy my Pylons application and need to daemonize it and > set up auto-restart if it dies. "paster serve production.ini start" > does not daemonize it, contrary to what "paster serve --help" says. > "paster serve --daemon production.ini" does, but it does not create a > PID file so you can't stop it. > > I made my configuration file executable and put this at the top: > > #!/usr/bin/env paster > [exe] > command = serve > daemon = true > pid_file = %(here)/data/paster.pid > log_file = %(here)/data/error.log > > I can start it and stop it in daemon mode with "./production.ini > start" and "./production.ini stop", but if I do "paster serve > production.ini start" it starts up in normal console mode with logging > to the console. Is this a bug in Paste?
I should probably just take the whole #! thing out, it's really finicky and platform-dependent. Linux and BSD are totally different, for instance, and BSD and OSX are also different from each other, I think. I like the pattern, it just shouldn't use "paster", it should use a completely different script dedicated to this purpose. > My other question is, paster has a --monitor-restart option to restart > the server if it dies. But the Pylons Cookbook has recipes for > daemontools and supervisor2. Are these better than paster's monitor > for some reason, or are they all interchangeable? They all work the same basic way. paster's is simpler, obviously, since it's just one option. But it hasn't been tested a whole lot, so I dunno. Also it probably has more overhead than daemontools, though I don't know if it really is significant. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org | Write code, do good | http://topp.openplans.org/careers --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
