On Nov 24, 8:33 pm, iain duncan <[EMAIL PROTECTED]> wrote: > On Fri, 2007-23-11 at 23:20 -0800, Graham Dumpleton wrote: > > On Nov 24, 8:07 am, iain duncan <[EMAIL PROTECTED]> wrote: > > > On Fri, 2007-23-11 at 21:58 +0100, remi jolin wrote: > > > > le 23.11.2007 17:06 Lukasz Szybalski a écrit: > > > > > Hello, > > > > > I am using turbogears in production server using mod_proxy which means > > > > > the turbogears app needs to be up and working. > > > > > > Is there a way to start it or make sure its up automatically?? > > > > > Does anybody have this implemented and working??? > > > > > I use supervisor2 to start and "maintain up" my TG servers. > > > >http://www.plope.com/software/supervisor2/ > > > > Fits my need :-) > > > > +1 on that. I finally got around to checking it out a couple of weeks > > > ago and it's an awesome little utility. > > > > You can even write super easy functional bot tests with twill off it > > > supervisord to really make sure everything is happy! > > > If using Apache just to run mod_proxy, you could avoid the whole issue > > by simply using mod_wsgi (http://www.modwsgi.org). This is because > > Apache/mod_wsgi acts as the supervisor system for you and as long as > > Apache is started when the system is started, as it usually would be, > > you don't have to do anything special, just the normal configuration > > of mod_wsgi to get it to host TurboGears. :-) > > Hey Graham, you seem pretty up on this stuff. Is this now viable for > less than expert sysadmins? I remember I looked into it last year and > heard two many warnings about possible issues doing the apache + > mod_wsgi + cherrypy root for someone like me ( a muddling along reading > tutorials type sysadmin ).
Hmmm, mod_wsgi didn't exist last year, so it couldn't have been an option at the time. Did you perhaps mean to say mod_python. Certainly from what I have read, their didn't seem to be much confidence in the mod_python adapter for TurboGears at least. > Also, would that help cut down on constant > ram use as compared to apache + mod_proxy to cherrypy or would that now > make any difference? For whatever reason, even under low loads, my > apache threads start off with reasonable ram use, and then a few days > later they have ballooned up to eat all the ram again. When running mod_wsgi in embedded mode, one can tell Apache to recycle child processes after a certain number of requests. This allows memory usage to be periodically reset back to base level. When using daemon mode of mod_wsgi, it also has a option to define maximum number of requests to process before recycling the daemon processes. In mod_wsgi 2.0 there is also an inactivity timeout option which allows the daemon processes to be recycled if no requests received for a while. This is handy if your site doesn't get much traffic between the times when you might use it a lot. > I was going to switch to nginx, but now I'm not so sure as it looks like > apache is pretty handy to use with SVN and trac. > > I would love to hear more about this configuration. This is definitely > something that would be welcomed on the site recipes. Recipe for mod_wsgi is: http://code.google.com/p/modwsgi/wiki/IntegrationWithTurboGears This isn't the whole story, as it just gives the basics and doesn't go into things like using maximum requests and inactivity timeouts, so important to read through some of the other documentation on the site as well. In time I will get some specific documentation up on tuning for performance, or reducing memory etc. Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

