Graham Dumpleton
graham.dumpleton at gmail.com
Tue Dec 22 16:49:58 EST 2009
2009/12/23 bharath venkatesh <bharathv6.project at gmail.com>: > will mod wsgi in Daemon mode solve this issue as loading libraries and > initialising is done only once ? Maybe. As documented in: http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html the OP is having problems because of how embedded mode Python applications work in Apache. This may be exacerbated by using prefork MPM with Apache. Same issues come up with mod_wsgi embedded mode as with mod_python if you do not configure your Apache correctly for fat Python web applications. If you are limited in being able to do that because Apache is heavily used for static file serving or mod_php, you really should use mod_wsgi daemon mode instead as described in that post. Why daemon mode will help is fixed number of persistent processes and more specifically defaulting to one process, so you only incur startup cost once and not for many processes, or in case of embedded mode also not when the processes get recycled as is default for Apache. Graham > On Tue, Dec 22, 2009 at 5:13 PM, bharath venkatesh > <bharathv6.project at gmail.com> wrote: >> >> Hi, >> >> Django with mod python is taking time loading libraries . I am using >> python open source libraries like montylingua , simplejson and django is >> taking >> time loading these libraries . >> >> When django is run using python manage.py runserver first request takes >> time but rest of the requests doesn't take time ( quite fast ) ,which is >> acceptable but when django is used along with apache and mod_python it takes >> time as much time as django takes for first request when run using python >> manage.py runserver for almost every request. >> >> How to avoid this as our performance is greatly hindered by this behaviour >> >> is it possible to cache these external open source libraries ? >> >> Thanks in Advance, >> Bharath > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python > >
|