Re: [php-49] sql too many connections

From: Dan M.
Sent on: Thursday, November 8, 2012 11:57 AM
Do you know how connections are handled while the script/s run? One thing that I've seen before is that each area of code (as in each include, procedural script, or class) will open it's own new connection to the db, instead of reusing an existing connection, which should reduce the number of open connections.


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[masked] | [address removed]




--
From the desk of Dan Munro

Our Sponsors

People in this
Meetup are also in:

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