I don't see a MaxConnections in Apache conf, or maybe I overlooked it. I do
see:

MaxClients 150

MaxKeepAliveRequests 100

It seems the latter var there relates more. Any ideas which or if both
should be bumped up?

I did read -- in various places -- that it was better to use connect,
including PHP. Because php and mysql are fast to open a regular connection,
using connect may ultimately be better. That's just what I read.

I found this bit:
http://us2.php.net/manual/en/features.persistent-connections.php

And decided it would be ok to use either, and preferrably connect due to
some other bits I read regarding persistent connections.

So really, I am confused on this matter. I believe it boils down to
configuration issues betweeen MySQL's conf and Apache's conf files. Maybe
even in php.ini. I can't seem to find a correct article on how to fix these
things. What I read in forums I become leary of, thinking the person may be
incorrect. So I like to stick to documentation. But I can't seem to find
enough.

--
Nicole


"Chris Shiflett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- Nicole <[EMAIL PROTECTED]> wrote:
> > I run Apache with PHP and MySQL [snip]
> >
> > I last increased my max connections to 500. That seemed to fix things
> > for a while. Now I am getting the problems (database freezing up
> > because too many connections) again. The site I run is pretty high
> > traffic.
>
> This has nothing to do with traffic (other than the fact that heavy
traffic can
> reveal configuration problems more easily).
>
> Are you using persistent connections (mysql_pconnect)? If so, you need to
make
> sure you have MySQL maximum connections (max_connections in my.cnf) set to
a
> number that is higher than Apache's MaxClients directive (in httpd.conf).
If
> you have MaxClients at 512, for example, and MySQL only allows a maximum
of 500
> connections, you're likely to run into the "too many connections" problems
once
> your traffic pushes the number of Apache clients past 500.
>
> Hope that helps.
>
> Chris
>
> =====
> HTTP Developer's Handbook
>      http://shiflett.org/books/http-developers-handbook
> My Blog
>      http://shiflett.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to