Re: [PHP-DEV] [PHP4] Logging native PHP function calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You want:

                         (number of apache children)
                       X (number of mysql usernames)
====================================================
(number of mysql connections allowed in /etc/my.cnf)

If you really have 150 MaxClients in httpd.conf and 140 mysql
usernames, your /etc/my.cnf should have:
    150
  X 140
=======
  15600

15,600 mysql connections is a LOT of connections, and will take a LOT
of RAM...

But that's the only way to be sure that you don't have connection
problems with that many users, as I understand it.

I've never tried to run a server with 140 mysql usernames, so I could
be wrong...

On Wed, June 13, 2007 2:54 pm, Markus Fischer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello Richard,
>
> thanks for your reply.
>
> Richard Lynch wrote:
>> Did somebody actually write a mysql_connect as a variable for the
>> function name? [shudder]
>
> Not me, actually some libraries do.
>
>> Otherwise, it seems like you could grep for mysql_connect and
>> mysql_pconnect and find all the places the connection is made.  And
>> rip them out and replace with an include, while you're at it. :-)
>
> I was at this point. But still I am not 100% sure that I found all
> mysql
> connections.
>
>> You *DO* understand that with _pconnect, you must have:
>>
>> httpd.conf MaxChildren TIMES number of mysql usernames
>
> I'm not aware of MaxChildren and I couldn't find it in the
> documentation, but I know about MaxClients.
>
> We've running two servers, each with MaxClients set to 150. The number
> of mysql users is 140.
>
>>
>> for your number of connections in /etc/my.cnf
>
> This number is 170 currently.
>
>>
>> Actually, you want a few "spare" connections so you can use mysql
>> command line monitor to connect and to do backups and so on.
>>
>> That number of connections can rapidly add up to a LOT of RAM if
>> you've got multiple MySQL usernames...
>
>
> Actually we've a dedicated hoster which maintains our hardware, but
> he's
> not able to prevent the "max connections" problems.
>
> Can you explain a bit how you meant you formular? I read it three
> times
> but I don't understand exactly what math you wanted to tell me
> (probably
> because I'm not native).
>
> thanks for your time, very appreciated!
>
> - - Markus
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGcEtc1nS0RcInK9ARAodyAKDinL9O4ApOblYI8lsNL0HuT1BXgwCeMK5R
> 1gYWlgZkqJPRmxU+xZEq4qA=
> =CkSM
> -----END PGP SIGNATURE-----
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux