application WSGImod_wsgi + apache non multithread, pourquoi?
# coding: utf-8
import time
def application(environ, start_response):
status = '200 OK'
output = str(time.time())
time.sleep(5)
output += ' -> ' + str(time.time())
response_headers = [('Content-type', 'text/html; charset=utf-8'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)
return [output]
Apache VirtualHost
ServerName localhost
WSGIDaemonProcess main user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias//var/www/main/main.wsgi
WSGIProcessGroup main
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
ErrorLog /var/log/apache2/main_error_log
CustomLog /var/log/apache2/main_log common
Сonnecting clients multiples, ils sont traités de manière séquentielle, il n'y a pas multithread. Pourquoi?
Quel paquet apache, spécifiquement? –
Fournissez les bits manquants de votre configuration qui entoure le WSGIProcessGroup. Je présume qu'il manque, sinon pourquoi est-il en retrait. De plus, quel MPM d'Apache utilisez-vous et avez-vous bidouillé les paramètres MPM alors que vous n'auriez pas dû. –