Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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