Re: [php-49] sql too many connections

From: Mark Steudel
Sent on: Thursday, November 8, 2012 1:24 PM
Heh,

1. This site is still using old skool mysql

2. How do you do that?


On Thu, Nov 8, 2012 at 1:00 PM, David Malouf <[address removed]> wrote:
Two MySQL specific things we've tinkered with are:

1) Using pooled connections.  This is done by pre-pending "p:" to the host (http://www.php.net/manual/en/mysqli.construct.php).

2) If the MySQL happens to be 'local', making sure to use sockets instead of TCP


My 1/2 cent,
David Malouf



On Thu, Nov 8, 2012 at 11:48 AM, Mark Steudel <[address removed]> wrote:
So I've inherited a site that has a lot of traffic and we're getting
too many sql connectionsin the error logs. Obviously one solution is
to up the # of max connections in the my.cnf (right now its at 150, I
upped it to 200). I wanted to explore the code and see if there were
some things from the php side I could do to eliminate some of the
problems. Any suggestions on things to try or look for? I can't decide
if using mysql_close explicitly on pages is a good idea or not. Any
guidelines?

--
-----------------------------------------
Mark Steudel
P: [masked]
F: [masked]
[address removed]

. : Work : .
http://www.mindfulinteractive.com

. : Play : .
http://www.steudel.org/blog

. : LinkedIn : .
http://www.linkedin.com/in/steudel



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/php-49/
This message was sent by Mark Steudel ([address removed]) from The Seattle PHP Meetup Group.
To learn more about Mark Steudel, visit his/her member profile: http://www.meetup.com/php-49/members/2764664/
Set my mailing list to email me

As they are sent
http://www.meetup.com/php-49/list_prefs/?pref=1

In one daily email
http://www.meetup.com/php-49/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/php-49/list_prefs/?pref=0
Meetup, PO Box 4668 #37895 New York, New York 10163-4668 | [address removed]






--

Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by David Malouf ([address removed]) from The Seattle PHP Meetup Group.
To learn more about David Malouf, visit his/her member profile



--
-----------------------------------------
Mark Steudel
P: [masked]
F: [masked]
[address removed]

. : Work : .
http://www.mindfulinteractive.com
 
. : Play : .
http://www.steudel.org/blog

. : LinkedIn : .
http://www.linkedin.com/in/steudel

Our Sponsors

People in this
Meetup are also in:

Log in

Not registered with us yet?

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy