I have a django site in an amazon ec2 m1.small instance.
Last night it started to throw the following error:
[Thu Dec 22 15:22:09 2011] [error] [client 190.21.7.178] Script timed out before returning headers: leonidas.wsgi, referer: http://www.google.cl/imgres?q=alisar+de+pelo+gama+multistyler&hl=es&gbv=2&biw=1280&bih=901&tbs=ic:specific,isc:pink&tbm=isch&tbnid=v4GnZQn2SOFY8M:&imgrefurl=http://yopeo.com/store/83/hogarstore/%3Fp%3D59&docid=An99bL21xPUHUM&imgurl=http://hogarstore.com.ar/images_prod/ficha_multistyler_toochic_det.jpg&w=217&h=300&ei=2nLzTueRNpKltwevj9XPBg&zoom=1&iact=hc&vpx=744&vpy=327&dur=328&hovh=240&hovw=173&tx=119&ty=125&sig=108063868808009324618&page=1&tbnh=161&tbnw=117&start=0&ndsp=23&ved=1t:429,r:8,s:0
[Thu Dec 22 15:22:21 2011] [error] [client 190.247.233.70] Script timed out before returning headers: leonidas.wsgi, referer: http://www.google.com.ar/url?sa=t&rct=j&q=tankini%20sol%20y%20oro&source=web&cd=3&sqi=2&ved=0CD0QFjAC&url=http%3A%2F%2Fyopeo.com%2F64164%2Fmalla-tankini-sol-y-oro-lisa-chebilla-bikini&ei=5nLzTtzuKNHqtgfA1-3UBQ&usg=AFQjCNEwuw1Qe7OAhzxpyeHCfsylH8KljQ
[Thu Dec 22 15:22:23 2011] [error] [client 186.61.12.46] Script timed out before returning headers: leonidas.wsgi, referer: http://www.google.com.ar/url?sa=t&rct=j&q=juego%20de%20magia%20funny&source=web&cd=2&sqi=2&ved=0CDAQFjAB&url=http%3A%2F%2Fyopeo.com%2F2250%2Fjuego-de-magia-funny&ei=LXTzToqDC8ahtweS1oHgDw&usg=AFQjCNHUcK4hM1fn9qjKKwHlXmUNt7eanw
[Thu Dec 22 15:22:53 2011] [error] [client 66.249.72.170] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:22:55 2011] [error] [client 201.137.41.199] Script timed out before returning headers: leonidas.wsgi, referer: http://www.google.com.mx/imgres?q=CP3MLIT&um=1&hl=es&sa=N&biw=1366&bih=587&tbm=isch&tbnid=ifZxl376m48cFM:&imgrefurl=http://yopeo.com/45799/planchitas-para-cabello-gama-cp3m-lit-laser-ion-tourmaline-ns&docid=MpAXGrEQYIP1GM&imgurl=http://hogarstore.com.ar/images_prod/CP3_20TOURMALINE(0).jpg&w=1000&h=309&ei=TXTzTpraB9OosAL6rLmTAQ&zoom=1&iact=hc&vpx=611&vpy=214&dur=1576&hovh=125&hovw=404&tx=240&ty=75&sig=109111153823049980307&page=1&tbnh=47&tbnw=153&start=0&ndsp=25&ved=1t:429,r:5,s:0
[Thu Dec 22 15:22:58 2011] [error] [client 201.137.41.199] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:03 2011] [error] [client 201.137.41.199] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:11 2011] [error] [client 157.55.16.57] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:22 2011] [error] [client 207.46.192.48] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:29 2011] [error] [client 190.2.52.125] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:43 2011] [error] [client 62.83.72.48] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:23:51 2011] [error] [client 62.83.72.48] Script timed out before returning headers: leonidas.wsgi
[Thu Dec 22 15:24:42 2011] [error] [client 207.46.192.48] Script timed out before returning headers: leonidas.wsgi
In a nutshell the system gives timeout after a long wait.
I've never seen that kind of error before. But a couple of searchs told me that it's a problem with the ammount of processes that apache can handle, an error with some C extensions [1] or some other stuff like that [2].
I've also checked if there is another processes using mod_python but that's not the case as it's not installed on the system.
Having ran out of tricks, running a manage.py runserver and trying to get something out of the instance, but wget localhost:8000 also gives the same symptoms.
FWIW this is the apache fig:
<VirtualHost *:80>
ServerAdmin capdevielle@gmail.com
ServerName yopeo.com
ServerAlias *.yopeo.com
DocumentRoot /opt/sites/yopeo/trunk/leonidas
ErrorLog /var/log/apache2/error.yopeoleonidas.log
WSGIDaemonProcess yopeoleonidas processes=3 threads=5
WSGIProcessGroup yopeoleonidas
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias / /opt/etc/yopeo/leonidas.wsgi
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
CustomLog /var/log/apache2/access.yopeoleonidas.log combined
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=301,L]
Alias /admin_media/ /opt/sites/admin_media/
<Directory /opt/sites/admin_media/>
Order deny,allow
Allow from all
Options -Indexes
</Directory>
Alias /media/ /opt/sites/yopeo/trunk/leonidas/media/
<Directory /opt/sites/yopeo/trunk/leonidas/media/>
Order deny,allow
Allow from all
Options -Indexes
</Directory>
</VirtualHost>
Any help is welcome.
[1] http://groups.google.com/group/modwsgi/browse_thread/thread/2b335de711908eb3