What to Do if You Get a "Too Many Connections" Message On A MySQL-Driven Site
|
03-02-2006, 12:54 PM,
Post: #1
|
|||
|
|||
What to Do if You Get a "Too Many Connections" Message On A MySQL-Driven Site
By default, most MySQL databases are installed with the maximum number of connections set to 100. You can verify the settings for your server by running the command mysqladmin variables and looking at the max_connections setting.
If you or your visitors frequently get a "too many connections" error message when trying to connect to your MySQL driven site you can add the following code to your /etc/my.cnf file to increase the number of connections. (You can set the number to higher than 250 connections but be aware of memory limitations). Restart MySQL after adding the code. Code: [mysqld] |
|||
03-02-2006, 09:51 PM,
Post: #2
|
|||
|
|||
Re: What to Do if You Get a "Too Many Connections" Message On A MySQL-Driven Site
Quote:mysqladmin variables if you're able to type in that exact command and find out the maximum number of connections you probably have realllly crappy security and you might want to think about using a password. :twistedevil: Those of you who thought to password protect mysql will probably type: mysqladmin variables -p :twistedevil:
"Well, Jay was so giddy that someone named Jay was involved with this site we posted our first non-eBay listing in 3 years here at Lunarbid (we tried two items at Yahoo once upon a time, they bombed)" -Marie posting in a LunarBid thread at OTWA in 2005 wins the award for 'most moronic reason ever given for choosing a venue"
"thanks twat u must have nothing better 2 do. do u talk to all your members like that. will not be recomending your site. best way to put it is TULIPTOOLS.COM IS REALLY SHIT. DONT JOIN." -pubescent owner of rinky dink off2auction.com in 2011 |
|||
03-03-2006, 03:11 AM,
Post: #3
|
|||
|
|||
Re: What to Do if You Get a "Too Many Connections" Message On A MySQL-Driven Sit
Making these 2 changes help prevent some too many connections errors too if you're running php scripts
change persistent to off in php.ini Code: [MySQL] or add this to .htaccess Code: php_value mysql.connect_timeout 20 |
|||
03-06-2006, 03:12 AM,
Post: #4
|
|||
|
|||
Re: What to Do if You Get a "Too Many Connections" Message On A MySQL-Driven Site
Quote:persistent ...and if you're using oscommerce and are on a shared server don't use persistent because your hosting company won't like you.
"Well, Jay was so giddy that someone named Jay was involved with this site we posted our first non-eBay listing in 3 years here at Lunarbid (we tried two items at Yahoo once upon a time, they bombed)" -Marie posting in a LunarBid thread at OTWA in 2005 wins the award for 'most moronic reason ever given for choosing a venue"
"thanks twat u must have nothing better 2 do. do u talk to all your members like that. will not be recomending your site. best way to put it is TULIPTOOLS.COM IS REALLY SHIT. DONT JOIN." -pubescent owner of rinky dink off2auction.com in 2011 |
|||
« Next Oldest | Next Newest »
|
Users browsing this thread: 1 Guest(s)