I use webfaction's shared hosting services for my python/php apps. There is one thing I don't understand.

Every time, I install a new PHP app, no new processes are created. But installing a new Python app creates at least 3 new processes on the server.

Why does each Python app require several processes whereas PHP apps don't?

EDIT: The python apps run with WSGI on Apache.


You didn't tell us enough to answer the question. There are several ways to write python apps, among them: CGI (does inherently require a process per connection), FastCGI (a pool of reusable python processes, with controllable size, is created and services connections - maybe it is too big for you?) and WSGI (Apache creates python interpreters in its threads, like PHP does). Please tell us the way you run your python apps from Apache.

  • Sorry, I didn't know that this was important. The python apps run with WSGI on Apache. – Mert Nuhoglu Oct 4 '10 at 18:16
  • Maybe you need a configuration directive like this: WSGIDaemonProcess default processes=2 threads=25 – AEP Oct 6 '10 at 5:01

I suggest you reimplement your python web applications with wsgi support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.