[Answered ]-How to run Apache with mod_wsgi and django in one process only?

2👍

No, the second process is not an onchange listener – I don’t know where you read that. That happens with the dev server, not with mod_wsgi.

You should not try to prevent Apache from serving multiple processes. If you do, the speed of your site will be massively reduced: it will only be able to serve a single request at a time, with others queued until the first finishes. That’s no good for anything other than a toy site.

Instead, you should fix your AppConfig. Rather than blindly spawning a listener, you should check to see if it has already been created before starting a new one.

0👍

You shouldn’t prevent spawning multiple processes, because it’s good thing, especially on production environment. You should consider using some external tool, separated from django or add check if folder listening is already running (for example monitor persistence of PID file and it’s content).

Leave a comment