PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

Plain Text | 39 lines | 29 code | 10 blank | 0 comment | 0 complexity | 0480a73a50f53140a554386d5bbffcb9 MD5 | raw file
 4.. warning::
 6   I'm pretty sure my understanding of the process model is actually
 7   incorrect, and this document isn't correct.
 9This document explains the process model of Silver Lining.
11Silver Lining runs under `mod_wsgi
12<>`_, but mod_wsgi itself is
13configurable, and Silver Lining configures it a specific way.  The
14result works like this:
16* Each application instance runs in its own processes.  So if you
17  upload multiple applications (that are all live simultaneously) then
18  those will never be in the same process.  This is necessary because
19  there's no way besides separate processes to keep paths and
20  libraries straight.
22* An application gets 5 concurrent processes.  That is, there is a
23  pool of 5 processes that wait for a request to come in.
25* There are no threads, each process is single-threaded.
27* Processes live for a limited number of requests (200 requests).
28  After that the process is killed and another started in its place.
29  This avoids some possible memory leaks or other problems associated
30  with long-running processes.
32* All processes run as the user ``www-data``.
34* "Internal" requests are run in their own short-lived processes.
35  This includes requests like the ``update_fetch`` request.  They
36  otherwise run very similarly to normal requests (as ``www-data``,
37  similar environment, etc).  However, because it is not actually
38  under mod_wsgi, it is very possible that there will be differences
39  in the environ.