>I would like to know how many PHP page apache generates in one thread at the
>For example, two clients share the same thread of the apache web server.
>they request at the same time a php page. Does apache process them one by
As I understand it:
Each child processes one (1) HTTP request at a time and then goes back in
the "pool" ready to do another.
If you count a "page" strictly as the HTML, then it's just one thread, one
If you are counting all the images and stuff, you never know which thread
gets which HTTP request (each image is another request) for a "page
>I use persistant database connections and I wonder, if one connection is
>always in use by one page or by more?
Each thread will end up having a connection.
Actually, it will have a connection for *each* username/password combination
used to connect, if you have multiple MySQL users in mysql_pconnect(...)
You want to be sure my.cnf has a few "extra" connections available over the
number of Apache children. Otherwise you can find yourself "locked out" of
using 'mysql' in the command line to do administration duties.
Imagine you have a shared host, with web-sites, both very busy, both using a
different (one each) MySQL username/password.
If your httpd.conf limits the maximum number of children to 50, you'd need:
2 X 50 + ~4 ===> ~104 connections as the limit in my.cnf
More Apache children ==> More connections
More MySQL username/passwords ==> More connections
I assume a very large ISP with hundreds of customers has to:
A) Give them all a common/shared username/password, *OR*
B) Throw in a *LOT* of RAM to handle all the connections
I don't know this for a fact, though.
Like Music? http://l-i-e.com/artists.htm
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php