2

I have a problem with my mod_wsgi configuration. Sometimes, I think when there is a lot of traffic on my website, the page breaks and says "Resource temporarily unavailable..."

Apache logs:

Timeout when reading response headers from daemon process

(11)Resource temporarily unavailable: [client 181...] mod_wsgi (pid=4726): Unable to connect to WSGI daemon process 'FlaskApp' on '/run/httpd/wsgi.28794.0.1.sock' after multiple attempts as listener backlog limit was exceeded or the socket does not exist.

The website makes about 12 requests every 2 minutes.

This is my httpd.conf file:

<VirtualHost *:443>
  DocumentRoot "/var/www/FlaskApp/FlaskApp"
  ServerName 54.165.200.2000
           
  WSGIScriptAlias / /var/www/FlaskApp/flaskapp.wsgi
  WSGIDaemonProcess FlaskApp python-path=/var/www/FlaskApp/FlaskApp/venv/lib/python3.6/site-packages processes=6 threads=5  
  WSGIProcessGroup FlaskApp

  <Directory /var/www/FlaskApp/FlaskApp/>
    WSGIProcessGroup FlaskApp           
    WSGIApplicationGroup %{GLOBAL}          
    Order allow,deny
    Allow from all
  </Directory>

  Alias /static /var/www/FlaskApp/FlaskApp/static
  <Directory /var/www/FlaskApp/FlaskApp/static/>
    Order allow,deny
    Allow from all
  </Directory> 

</VirtualHost>

What's causing the problem?

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Tony
  • 21
  • 2

0 Answers0