Run django application on apache using uWSGI

I wanted to run a django application using apache and uWSGI. So I installed apache which uses worker_module. When I finally launched the application and tested its performance with httperf, I noticed that the system can only serve one user at a time. The strange thing is that when I run uWSGI using the same command as below with nginx, I can serve 97 concurrent users. Is it possible that apache is running so slow?

My apache configuration looks like (the most important elements are the current default settings):

<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadsPerChild      25
    MaxClients           63
    MaxRequestsPerChild   0
</IfModule>
...
<Location />
    SetHandler uwsgi-handler
    uWSGISocket 127.0.0.1:8000
</Location>

I run uwsgi using:

uwsgi --socket :8000 --chmod-socket --module wsgi_app --pythonpath /home/user/directory/uwsgi -p 6
+5
source share
1 answer

Apache Nginx. :

  • Apache 127.0.0.1:81
  • nginx 0.0.0.0:80
  • nginx -, Apache

, IMHO - :

  • Apache
  • - Apache Nginx (uWSGI PHP ...),
+1

All Articles