Sujet : Re: Triggered By Mediocre Code (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.pythonDate : 28. Aug 2024, 00:40:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <valo4v$35rt8$6@dont-email.me>
References : 1 2 3 4 5 6 7 8
User-Agent : Pan/0.160 (Toresk; )
On Tue, 27 Aug 2024 09:48:49 -0700, Paul Rubin wrote:
Separate PHP apps need separate web server processes, anyway.
I had thought the opposite, but I'm not much of a PHP user.
A PHP code page is written to respond to a single HTTP request and return
a single response. So to handle multiple simultaneous requests, you need
multiple instances of that code running. mod_php can’t do that within a
single process (I don’t think), so you need a separate process for each
simultaneous connection. (Of course Web servers have techniques for
keeping and reusing those worker processes, to avoid doing fork(2) calls
all the time.)
With Python ASGI, you control what happens. A single process can handle
multiple connections, if you so choose.