[Sun Oct 26 07:34:34.732934 2014] [wsgi:error] [pid 29268:tid 140053011478272] [client xx.xxx.xxx.xxx:xxxxx] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py[Sun Oct 26 07:34:37.198806 2014] [wsgi:error] [pid 27816:tid 140052910765824] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.[Tue Oct 28 02:20:40.722140 2014] [wsgi:error] [pid 24158:tid 140182690981632] (2)No such file or directory: [client 24.171.250.159:60769] mod_wsgi (pid=24158): Unable to connect to WSGI daemon process 'snaptee-production-api-ssl' on '/var/run/apache2/wsgi.30188.7.3.sock'.
WSGIDaemonProcess site-1 display-name=site-1 user=www-data threads=25 python-path=/home/ubuntu/site-1/django:/home/ubuntu/.virtualenvs/site-1/lib/python2.7/site-packagesWSGIProcessGroup site-1WSGIApplicationGroup %{GLOBAL}WSGIScriptAlias / /home/ubuntu/site-1/apache/wsgi.py<IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestWorkers 150 MaxConnectionsPerChild 1000</IfModule>Hi Graham and everyone elseI'm running multiple site on Django 1.6.7, Apache/2.4.7 (Ubuntu 14.04), OpenSSL/1.0.1f, mod_wsgi/4.2.5, Python/2.7.6, Server MPM: worker.I found that the server start returning 504 and then 503, and the following error shown up.I researched some issues related with it, even added "WSGISocketPrefix /var/run/apache2/wsgi", but the issue still occured.I have no idea why it happened. Can anyone give some directions on this issue?Thanks!apache error log[Sun Oct 26 07:34:34.732934 2014] [wsgi:error] [pid 29268:tid 140053011478272] [client xx.xxx.xxx.xxx:xxxxx] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py[Sun Oct 26 07:34:37.198806 2014] [wsgi:error] [pid 27816:tid 140052910765824] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.
occasionally[Tue Oct 28 02:20:40.722140 2014] [wsgi:error] [pid 24158:tid 140182690981632] (2)No such file or directory: [client 24.171.250.159:60769] mod_wsgi (pid=24158): Unable to connect to WSGI daemon process 'snaptee-production-api-ssl' on '/var/run/apache2/wsgi.30188.7.3.sock'.
wsgi config for that siteWSGIDaemonProcess site-1 display-name=site-1 user=www-data threads=25 python-path=/home/ubuntu/site-1/django:/home/ubuntu/.virtualenvs/site-1/lib/python2.7/site-packagesWSGIProcessGroup site-1WSGIApplicationGroup %{GLOBAL}WSGIScriptAlias / /home/ubuntu/site-1/apache/wsgi.pyworker.conf<IfModule mpm_worker_module>StartServers 2MinSpareThreads 25MaxSpareThreads 75ThreadLimit 64ThreadsPerChild 25MaxRequestWorkers 150MaxConnectionsPerChild 1000</IfModule>
Hi Graham,Thanks a lot for your detailed explanations.I used to reload the apache processes instead of restart them.So is there any relation to the "MaxConnectionsPerChild" setting that when the process met the limit, it restart the child process?
If so, any alternative to this setting? I used this setting to bound the memory usage of apache.
Upgrading to mod_wsgi 4.3.0 will solve this problem? mod_wsgi 4.3.0 improved handling on segmentation fault error?
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
On 28/10/2014, at 5:18 PM, Kelvin Wong <kelvi...@gmail.com> wrote:Hi Graham,Thanks a lot for your detailed explanations.I used to reload the apache processes instead of restart them.So is there any relation to the "MaxConnectionsPerChild" setting that when the process met the limit, it restart the child process?There shouldn't be as MaxConnectionsPerChild only pertains to the Apache child worker processes and the number of connections. When a specific Apache child worker process is restarted, it is in a form of graceful restart, but the Apache configuration isn't being read by Apache as a whole so the 'generation' counter inside Apache wouldn't change and so the name of the proxy socket file wouldn't change either. So that option shouldn't cause those errors.If so, any alternative to this setting? I used this setting to bound the memory usage of apache.The issue is why you would be seeing memory growth in the Apache child worker processes to start with and how much. By rights they shouldn't keep increasing in memory usage. They can increase in memory a bit, but then should plateau. For example:
<PastedGraphic-1.tiff>
One further comment about those per worker thread memory pools. It isn't an issue for you as you are using Apache 2.4, but Apache 2.2 in particular may be susceptible to further problems with them when doing proxying, as is the case with mod_wsgi daemon mode. This was exacerbated due to the unbounded limit.To understand the problem, I will explain what happens in Apache 2.4 when proxying.So when a request is received by Apache it is accepted by the Apache child worker process. It is worked out it needs to be handled by the WSGI application in a mod_wsgi daemon process. The request details (headers) are then proxied across to the mod_wsgi daemon process. There is a little handshake done to see if the mod_wsgi daemon process will accept it, or whether something has changed and the mod_wsgi daemon process wants to do a restart at that time. This might occur where the WSGI script file was touched.If the mod_wsgi daemon process is going to accept the request, all the request content is then sent across to the mod_wsgi daemon process. The WSGI application should be reading this content. Only once the request content has all been sent, will the Apache child worker process start looking for response headers and content from the mod_wsgi daemon process.Now, when dealing with this response, the Apache child worker process will simply go into a loop of reading data from the mod_wsgi daemon process and writing it back out to the client. In writing back data to the HTTP client though, it isn't direct onto the socket connection. Instead it is via Apaches output filter stack where various transformations may be applied. When it final gets down to the lowest output filter, which is the core output filter, if when writing data onto the socket it determines that the write would block, rather than block it will buffer the data and return. This allows what is producing data to keep working.The problem that can arise here is that if the producer of the data, in this case the code reading the response from the mod_wsgi daemon process, is generating data quicker than the HTTP client is consuming it, then data could keep getting buffered up and so grow memory. Because of this issue there is some protection though and there is a threshold on the amount of data that will be allowed to be buffered. When this threshold is reached, then the writing of data back to the HTTP client will be forced to block until the HTTP client reads more data.So there is definitely protection on buffering up too much data in memory in Apache 2.4. Right now my understanding is that this protection may not exist in Apache 2.2. Certainly the code in Apache 2.2 is quite different and there aren't huge comments in it like in Apache 2.4 which explain how the buffering works.For Apache 2.2 then, what this may mean if there is indeed no limit on the amount of buffering is that if you have a slow HTTP client, then some part of the response coming back from a WSGI application in mod_wsgi daemon mode might get buffered up in the memory of the Apache child worker process. This will be allocated against the per worker thread memory pool. Thus memory can blow out. Further, with there being no MaxMemFree default in Apache 2.2, even when the request is done, that memory is retained against the per worker thread memory pool and will not be released back to the process to be used by other things.There are two potential problems with Apache 2.2 therefore. Potentially no limit on how much can be buffered in memory and then even when a request completes, all that memory which was buffered gets retained by that worker thread.The moral of this story. Use Apache 2.4, and do not use Apache 2.2.Since I have never gone and tested Apache 2.2 to validate my understanding on this point, probably about time I went and did that. :-)
Would suggest upgrading to mod_wsgi 4.3.0 if you can as the error messages when there are communication problems between Apache child worker process and mod_wsgi daemon process have been improved.More comments below.On 28 October 2014 15:43, Kelvin Wong <kelvi...@gmail.com> wrote:Hi Graham and everyone elseI'm running multiple site on Django 1.6.7, Apache/2.4.7 (Ubuntu 14.04), OpenSSL/1.0.1f, mod_wsgi/4.2.5, Python/2.7.6, Server MPM: worker.I found that the server start returning 504 and then 503, and the following error shown up.I researched some issues related with it, even added "WSGISocketPrefix /var/run/apache2/wsgi", but the issue still occured.I have no idea why it happened. Can anyone give some directions on this issue?Thanks!apache error log[Sun Oct 26 07:34:34.732934 2014] [wsgi:error] [pid 29268:tid 140053011478272] [client xx.xxx.xxx.xxx:xxxxx] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py[Sun Oct 26 07:34:37.198806 2014] [wsgi:error] [pid 27816:tid 140052910765824] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.This one can occur when the mod_wsgi daemon process crashes. There should be a segmentation fault error message or similar in the main Apache error log (not VirtualHost specific log).It can also occur if there are incomplete requests still running when a mod_wsgi daemon process is shutdown on being restarted due to the WSGI script file being touched or if Apache was restarted. In the latter case, the mod_wsgi daemon process would have had to have been killed off by Apache before the Apache child worker process which was proxying it to had. This can especially be the case if an Apache graceful restart was being done.occasionally[Tue Oct 28 02:20:40.722140 2014] [wsgi:error] [pid 24158:tid 140182690981632] (2)No such file or directory: [client 24.171.250.159:60769] mod_wsgi (pid=24158): Unable to connect to WSGI daemon process 'snaptee-production-api-ssl' on '/var/run/apache2/wsgi.30188.7.3.sock'.This can also be due to Apache graceful restart being done and there were keep alive connections being handled from a HTTP client. In an Apache graceful restart, because of Apache handles the mod_wsgi daemon processes, they don't have a graceful shutdown in the same way as Apache child worker processes.So what happens is the following:1. Apache graceful restart is triggered.2. Apache parent process sends SIGUSR1 to Apache child worker process to signal graceful shutdown.3. Apache parent process sends SIGINT to mod_wsgi daemon processes to signal shutdown.4. The mod_wsgi daemon processes complete their requests and restart. In the next incarnation of the mod_wsgi daemon processes after an Apache restart they expect a different path for the proxy socket, with the number at the end increasing based on Apache generation number.5. The Apache child worker process because it was in a graceful restart mode, operates on the understanding that it can keep handling any requests on a keep alive socket connection from a HTTP client until there are no more. It therefore takes next request on same connection and tries to connect to mod_wsgi daemon process, but using the proxy socket name as was used before, but that name has changed for the next Apache configuration generation and no longer exists, thus it fails.
do you actually have figures on what the memory usage of the Apache child worker processes grows to?I do. I used New Relic to monitor the system resource usage. I found as time goes, the apache processes take a lot of memory. That's why I want to control the memory usage of the apache.
Also, my application is mainly apis for mobile application which involved uploading files/images. I found that there are a lot of IOError occurred as seemed the upload is unexpected terminated by the mobile application.Do you have any suggestions on this?
And will these kind of requests keep in memory forever as it handled incorrectly and make the memory usage grow?
So what happens is the following:1. Apache graceful restart is triggered.2. Apache parent process sends SIGUSR1 to Apache child worker process to signal graceful shutdown.3. Apache parent process sends SIGINT to mod_wsgi daemon processes to signal shutdown.4. The mod_wsgi daemon processes complete their requests and restart. In the next incarnation of the mod_wsgi daemon processes after an Apache restart they expect a different path for the proxy socket, with the number at the end increasing based on Apache generation number.5. The Apache child worker process because it was in a graceful restart mode, operates on the understanding that it can keep handling any requests on a keep alive socket connection from a HTTP client until there are no more. It therefore takes next request on same connection and tries to connect to mod_wsgi daemon process, but using the proxy socket name as was used before, but that name has changed for the next Apache configuration generation and no longer exists, thus it fails.
Is there any ways to avoid Apache graceful restart? Apache graceful restart is triggered by the "MaxConnectionsPerChild" or other settings?If so, is it better to control by "maximum-requests" in mod_wsgi setting?
[Wed Oct 29 12:56:26.727197 2014] [mpm_worker:error] [pid 1322:tid 139958218430336] AH00287: server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting[Wed Oct 29 12:56:30.730902 2014] [mpm_worker:error] [pid 1322:tid 139958218430336] AH00286: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting[Wed Oct 29 12:56:26.727197 2014] [mpm_worker:error] [pid 1322:tid 139958218430336] AH00287: server is within MinSpareThreads of MaxRequestWorkers, consider raising the MaxRequestWorkers setting[Wed Oct 29 12:56:30.730902 2014] [mpm_worker:error] [pid 1322:tid 139958218430336] AH00286: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting<IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestWorkers 400 MaxConnectionsPerChild 0</IfModule>
Thanks for the details!I now have a better picture on how it works.I employed all the recommendations you suggested. I will keep monitoring the processes.But how about the graceful restart signaled by Apache? Why it happened?
[Sun Oct 26 07:34:37.198806 2014] [wsgi:error] [pid 27816:tid 140052910765824] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.
Thanks again.
...For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://grou
Thanks again.
Graham
More comments below.
...<div style="font-family:Arial,Helvetica,sans-serif;background-col
You means that the OS triggered Apache graceful restart? If so, why the OS do that?
--
Oh. I see. Thanks.One more question.As I set the graceful-timeout on mod_wsgi process, then when Apache do graceful restart, will mod_wsgi obey that timeout setting?
Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py(11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'....
I have some updates on the issue as it happened again. This time I captured some data from New Relic.
From the Requests.png, I found that there is an spike aroung 22:23 and check the Apache log. I found there are many as following.Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py
Spike also found on the Workers.png during that time period. The graph is showing most of the worker is doing write?
After a few minute, the following log appear again, and start returning 503.(11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.
Can you tell what happened from those graphs?
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
<Requests.png><Workers.png>
Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py
/var/log/apache2/*.log { weekly missingok rotate 52 compress delaycompress notifempty create 640 root adm sharedscripts postrotate if /etc/init.d/apache2 status > /dev/null ; then \ /etc/init.d/apache2 reload > /dev/null; \ fi; endscript prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi; \ endscript}On 02/11/2014, at 2:18 AM, Kelvin Wong <kelvi...@gmail.com> wrote:I have some updates on the issue as it happened again. This time I captured some data from New Relic.
From the Requests.png, I found that there is an spike aroung 22:23 and check the Apache log. I found there are many as following.Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py
Spike also found on the Workers.png during that time period. The graph is showing most of the worker is doing write?
After a few minute, the following log appear again, and start returning 503.(11)Resource temporarily unavailable: [client xx.xx.xx.xx:xxxxx] mod_wsgi (pid=27816): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.17227.2.3.sock'.
Can you tell what happened from those graphs?What I need to see is more of the log file around those events.Ensure you have LogLevel set to 'info' in the Apache configuration as mod_wsgi will then log more messages about why processes restarted.Also ensure you are checking for message around the time in the global Apache error log and not just in any virtual host specific error log, as some messages, such as evidence of a restart or process crashes will only appear in the main Apache error log.With memory growth under control:turning to look at daemon process restarts:they are obviously more frequent. Zooming in, each process is restarting about every 5 minutes, although varies over time.
...
2014-11-03 07:47:01.591 [Mon Nov 03 07:46:53.795864 2014] [wsgi:error] [pid 3724:tid 140372768429824] [client xx.xx.xx.xx:26561] Truncated or oversized response headers received from daemon process 'site-1': /home/ubuntu/site-1/apache/wsgi.py2014-11-03 07:47:01.591 [Mon Nov 03 07:46:54.109098 2014] [wsgi:error] [pid 4615:tid 140372718073600] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:26793] mod_wsgi (pid=4615): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.3387.0.4.sock'....
I don't think the original error situation is caused by server overloading as the traffic of the server on that time it's fine.
I just want to rule out some conditions as returning 503 can be caused by overloading the service.
Overloading the servers can produce 503 but the error log messages do not match with the original error log message.
[Mon Nov 03 11:11:14.947304 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Shutdown requested 'site-2'.[Mon Nov 03 11:11:14.947499 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Stopping process 'site-2'.[Mon Nov 03 11:11:14.947521 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Destroying interpreters.[Mon Nov 03 11:11:14.947536 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Cleanup interpreter ''.[Mon Nov 03 11:11:14.951446 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Shutdown requested 'site-1'.[Mon Nov 03 11:11:14.951672 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Stopping process 'site-1'.[Mon Nov 03 11:11:14.951693 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Destroying interpreters.[Mon Nov 03 11:11:14.951708 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Cleanup interpreter ''.[Mon Nov 03 11:11:14.955690 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Shutdown requested 'site-3'.[Mon Nov 03 11:11:14.955911 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Stopping process 'site-3'.[Mon Nov 03 11:11:14.955933 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Destroying interpreters.[Mon Nov 03 11:11:14.955947 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Cleanup interpreter ''.[Mon Nov 03 11:11:14.967577 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Terminating Python.[Mon Nov 03 11:11:14.970224 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Python has shutdown.[Mon Nov 03 11:11:14.970246 2014] [wsgi:info] [pid 4476:tid 139644458678144] mod_wsgi (pid=4476): Exiting process 'site-3'.[Mon Nov 03 11:11:14.975368 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Terminating Python.[Mon Nov 03 11:11:14.978051 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Python has shutdown.[Mon Nov 03 11:11:14.978072 2014] [wsgi:info] [pid 4477:tid 139644458678144] mod_wsgi (pid=4477): Exiting process 'site-1'.[Mon Nov 03 11:11:14.983240 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Terminating Python.[Mon Nov 03 11:11:14.986019 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Python has shutdown.[Mon Nov 03 11:11:14.986041 2014] [wsgi:info] [pid 4478:tid 139644458678144] mod_wsgi (pid=4478): Exiting process 'site-2'.[Mon Nov 03 11:11:18.985926 2014] [wsgi:error] [pid 1712:tid 140701685757696] [client xx.xx.xx.xx:13183] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:11:57.511176 2014] [wsgi:error] [pid 2417:tid 140701627008768] [client xx.xx.xx.xx:9079] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:11:59.504832 2014] [wsgi:error] [pid 2026:tid 140701568259840] [client xx.xx.xx.xx:13194] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:12:02.893114 2014] [wsgi:error] [pid 1712:tid 140701593437952] [client xx.xx.xx.xx:9123] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:12:15.471793 2014] [wsgi:error] [pid 2026:tid 140701643794176] [client xx.xx.xx.xx:9145] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:12:18.741610 2014] [wsgi:error] [pid 1712:tid 140701840639744] [client xx.xx.xx.xx:13230] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:19:32.470117 2014] [wsgi:error] [pid 1712:tid 140701840639744] [client xx.xx.xx.xx:9723] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:19:33.336583 2014] [wsgi:error] [pid 2417:tid 140701807068928] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10126] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:36.421071 2014] [wsgi:error] [pid 1712:tid 140701660579584] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10148] mod_wsgi (pid=1712): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:38.102948 2014] [wsgi:error] [pid 1712:tid 140701677364992] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10157] mod_wsgi (pid=1712): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:38.186446 2014] [wsgi:error] [pid 1712:tid 140701685757696] [client xx.xx.xx.xx:13868] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:19:42.206195 2014] [wsgi:error] [pid 1712:tid 140701823854336] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14302] mod_wsgi (pid=1712): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:42.366307 2014] [wsgi:error] [pid 3039:tid 140701568259840] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14306] mod_wsgi (pid=3039): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:46.209203 2014] [wsgi:error] [pid 2417:tid 140701593437952] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14308] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:47.026183 2014] [wsgi:error] [pid 2026:tid 140701677364992] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14312] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:49.092478 2014] [wsgi:error] [pid 1712:tid 140701652186880] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10163] mod_wsgi (pid=1712): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:49.505943 2014] [wsgi:error] [pid 2417:tid 140701840639744] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14314] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:49.692284 2014] [wsgi:error] [pid 2417:tid 140701719328512] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10173] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:49.725615 2014] [wsgi:error] [pid 2026:tid 140701568259840] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14316] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:52.273296 2014] [wsgi:error] [pid 2026:tid 140701685757696] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10175] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:53.356815 2014] [wsgi:error] [pid 2026:tid 140701823854336] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14318] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:57.364586 2014] [wsgi:error] [pid 2026:tid 140701585045248] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10178] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:19:57.620572 2014] [wsgi:error] [pid 2417:tid 140701652186880] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14324] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:01.508145 2014] [wsgi:error] [pid 2026:tid 140701719328512] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14331] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:03.685263 2014] [wsgi:error] [pid 3039:tid 140701576652544] [client xx.xx.xx.xx:9777] Timeout when reading response headers from daemon process 'site-1': /home/ubuntu/snaptee-production/apache/wsgi.py[Mon Nov 03 11:20:07.131191 2014] [wsgi:error] [pid 2026:tid 140701610223360] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14337] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:07.210243 2014] [wsgi:error] [pid 2026:tid 140701601830656] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10185] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:10.990187 2014] [wsgi:error] [pid 2417:tid 140701660579584] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10206] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:12.343626 2014] [wsgi:error] [pid 2026:tid 140701807068928] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14353] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:12.383353 2014] [wsgi:error] [pid 2417:tid 140701601830656] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10210] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:12.514056 2014] [wsgi:error] [pid 2026:tid 140701568259840] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10213] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:13.106436 2014] [wsgi:error] [pid 2026:tid 140701677364992] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14356] mod_wsgi (pid=2026): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:13.367651 2014] [wsgi:error] [pid 3039:tid 140701668972288] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10219] mod_wsgi (pid=3039): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:17.423692 2014] [wsgi:error] [pid 2417:tid 140701610223360] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:14359] mod_wsgi (pid=2417): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:17.450428 2014] [wsgi:error] [pid 3039:tid 140701815461632] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10221] mod_wsgi (pid=3039): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'.[Mon Nov 03 11:20:20.733221 2014] [wsgi:info] [pid 3794:tid 140056943240960] mod_wsgi (pid=3794): Maximum requests reached, triggering immediate shutdown 'site-1'.[Mon Nov 03 11:20:20.733323 2014] [wsgi:info] [pid 3794:tid 140057235269504] mod_wsgi (pid=3794): Shutdown requested 'site-1'.[Mon Nov 03 11:20:20.733511 2014] [wsgi:info] [pid 3794:tid 140057235269504] mod_wsgi (pid=3794): Stopping process 'site-1'.[Mon Nov 03 11:20:20.733528 2014] [wsgi:info] [pid 3794:tid 140057235269504] mod_wsgi (pid=3794): Destroying interpreters.[Mon Nov 03 11:20:20.733538 2014] [wsgi:info] [pid 3794:tid 140057235269504] mod_wsgi (pid=3794): Cleanup interpreter ''.[Mon Nov 03 11:20:20.734308 2014] [wsgi:error] [pid 3794:tid 140057235269504] 2014-11-03 11:20:20,734 (3794/Dummy-7) newrelic.core.agent INFO - New Relic Python Agent Shutdown[Mon Nov 03 11:20:20.680893 2014] [wsgi:error] [pid 1712:tid 140701710935808] (11)Resource temporarily unavailable: [client xx.xx.xx.xx:10226] mod_wsgi (pid=1712): Unable to connect to WSGI daemon process 'site-1' on '/var/run/apache2/wsgi.1237.0.4.sock'....
...
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
<error.log>
...
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
<main_error.log>
Thanks.
Graham
...<div style="background-color:rgb(250,250,250);border-color:rgb(187,187,
--
You received this message because you are subscribed to the Google Groups "modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at http://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
<stacktrace.log>
If all the request threads reported as being stuck in the PostgreSQL connect() call, then it would appear to be the same issue.The problem is caused by a bug in the libpq client library for PostgreSQL. That there is a problem has been acknowledged by the PostgreSQL developers in:
Thanks.
Graham
...<a href="http://lists.mysql.com/internals/35082" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Flists.mysql.com%2Finternals%2F35082\46sa\75D\46sntz\0751\46usg\75AFQjCNH0kf_bC493Rq4t-IdCLZdF5iAnwg';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Flists.mysql.com%2Finternals%2F35082\46sa\75D\46sntz\0751\46usg\75AFQjCNH0kf_bC493Rq