Sloooooowwwww WSGI restart

Ron Garret rNOSPAMon at flownet.com
Wed Jan 28 20:12:19 EST 2009


In article <mailman.8227.1233179051.3487.python-list at python.org>,
 Jean-Paul Calderone <exarkun at divmod.com> wrote:

> On Wed, 28 Jan 2009 13:35:56 -0800, Ron Garret <rnospamon at flownet.com> wrote:
> >I'm running a WSGI app under apache/mod_wsgi and I've noticed that
> >whenever I restart the server after making a code change it takes a very
> >long time (like a minute) before the script is active again.  In other
> >words, I do an apachectl restart, reload the page in my browser, and one
> >minute later it finally comes up.  During this time CPU usage is
> >essentially zero.  Loading all the code manually into a python
> >interpreter is virtually instantaneous, and all subsequence interactions
> >with the app are very fast.
> >
> >Does anyone have any ideas what might be going on or how to debug this?
> 
> strace is nice.  It sounds like some blocking network operation.  rdns can
> often cause things like this.  If you're lucky, strace will point right at
> the problem.
> 
> Jean-Paul

That's a good idea.  Thanks!

rg



More information about the Python-list mailing list