title: Django site very slow to load after restart or period of inactivity
body: <p>I'm running a Django site on Apache, and am experiencing very slow intial page loads after a period of inactivity (about 1 hour).  I can replicate by leaving for an hour, or bouncing the server.  After the initial load, pages load consistently in &lt; 1 sec.</p>
  
  <p>I'm assuming (guessing) the issue is the Python interpreter + Python modules are being loaded into memory again after these periods of inactivity?</p>
  
  <p>I've followed <a href="http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html" rel="noreferrer">http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html</a> and am running <strong>mod_wsgi</strong> in daemon mode.</p>
  
  <p><strong>Server config:</strong></p>
  
  <pre><code>Timeout 20
  KeepAlive Off
  MaxKeepAliveRequests 100
  KeepAliveTimeout 15
  ServerLimit 10
  
  &lt;IfModule mpm_prefork_module&gt;
      StartServers          2
      MinSpareServers       2
      MaxSpareServers       2
      MaxClients            4
      MaxRequestsPerChild   0
  &lt;/IfModule&gt;
  
  ...
  
  WSGIDaemonProcess django display-name=%{GROUP}
  WSGIScriptAlias / /path/to/osqa.wsgi process-group=django application-group=%{GLOBAL}
  </code></pre>
  
  <p>Is something obviously wrong with the config above, or is there a way to keep the Python interpreter in memory?</p>
  
  <p>Perhaps this a different issue altogether?</p>
  
  <p>Thanks</p>