title: mod_wsgi daemon mode, WSGIApplicationGroup and Python interpreter separation
body: <p>I have Apache with 2 virtual hosts, each having a Django site attached using mod_wsgi, daemon mode, like this:</p>
  
  <pre><code>&lt;VirtualHost 123.123.123.123:80&gt;
      WSGIDaemonProcess a.com user=x group=x processes=5 threads=1
      WSGIProcessGroup a.com
      WSGIApplicationGroup %{GLOBAL}
  &lt;/VirtualHost&gt;
  
  &lt;VirtualHost 123.123.123.123:80&gt;
      WSGIDaemonProcess b.com user=x group=x processes=5 threads=1
      WSGIProcessGroup b.com
      WSGIApplicationGroup %{GLOBAL}
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I use <code>WSGIApplicationGroup %{GLOBAL}</code> because of <a href="http://trac.xapian.org/ticket/185" rel="nofollow noreferrer">a known problem with Xapian</a>.</p>
  
  <p>Now, if I understand what's going on behind the scenes, mod_wsgi launches 5 daemon processes for each of my sites. I can see this in Apache log:</p>
  
  <pre><code>[info] mod_wsgi (pid=8106): Attach interpreter ''.
  [info] mod_wsgi (pid=8106): Adding '.../lib/python2.5/site-packages' to path.
  [info] mod_wsgi (pid=8106): Enable monitor thread in process 'a.com'.
  [info] mod_wsgi (pid=8106): Enable deadlock thread in process 'a.com'.
  
  [info] mod_wsgi (pid=8107): Attach interpreter ''.
  [info] mod_wsgi (pid=8107): Adding '.../lib/python2.5/site-packages' to path.
  [info] mod_wsgi (pid=8107): Enable monitor thread in process 'a.com'.
  [info] mod_wsgi (pid=8107): Enable deadlock thread in process 'a.com'.
  
  ...
  </code></pre>
  
  <p>What I don't understand is if those <code>"Attach interpreter ''"</code> lines indicate that all of those processes share the same Python interpreter, or if there is one interpreter per process. (BTW I realize that the empty interpreter name '' is caused by passing <code>%{GLOBAL}</code> to <code>WSGIApplicationGroup</code>).</p>
  
  <p>I tried checking if maybe <code>sys.path</code> entries cumulated in subsequent processes, but they didn't - which could indicate that there's a separate Python interpreter for each of the 5 daemon processes... but I don't quite understand all these things so I'm asking here.</p>