You mean why do you have 3 extra per mod_wsgi daemon process.
For your configuration, 15 new threads will be created for handling the requests. The other 3 in a process are due to:
- The main thread which the process was started as. It will wait until the appropriate signal is received to shutdown the process.
- A monitor thread which checks for certain events to occur and which will signal the process to shutdown.
- A deadlock thread which checks to see if a deadlock has occurred in the Python interpreter. If it does occur, it will sent an event which thread (2) will detect. Thread (2) would then send a signal to the process to quit. That signal would be detected by thread (1) which would then gracefully exit the process and try and cleanup properly.
So the extra threads are all about ensuring that the whole system is very robust in the event of various things that can occur. Plus ensuring that when the process is being shutdown that the Python sub intepreters are destroyed properly to allow atexit registered Python code to run to do its own cleanup.