2010/1/22 Shachar Shemesh <[email protected]>:
> Hi all,
>
> I'm running a web2py server on Apache2 on Debian (Apache version
> 2.2.9-10+lenny6). It seems that if an Ajax request comes in, the
> Apache process climbs to 100% CPU for about 10 seconds (sometimes a
> little more, sometimes a little less) before the request is served to
> the browser. This happens even for rather small Ajax content.
>
> I put in debug prints into the gateway python script, and confirmed
> that the process is taking its time before the script is being
> invoked, as well as after the script finishes. The script itself takes
> almost no time to execute.
>
> I tried switching wsgi from daemon to embedded mode, with no affect
> over the problem.
>
> Any help in how to begin debugging this would be greatly appreciated.

What version of mod_wsgi are you using?

If using mod_wsgi 3.1, try mod_wsgi 2.8 instead and tell us if it is
any different.

Also try a simple WSGI hello world program that doesn't use a web
framework. See:

  http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide

for an example.

Also try putting some print statements in WSGI script file and see if
the time isn't just the time taken to import web application the first
time. Thus add at start of WSGI script:

  import time, sys
  print >> sys.stderr, "IMPORT START", time.time()

at end of WSGI script:

  print >> sys.stderr, "IMPORT FINISH", time.time()

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" 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/modwsgi?hl=en.

Reply via email to