News:

Wondering if this will always be free?  See why free is better.

Main Menu

Getting the following error...

Started by damo1065, July 28, 2004, 12:38:58 AM

Previous topic - Next topic

damo1065

I've had no problems with my site and forums till about half an hour ago. When I got the following message on my site

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/thegaf2/public_html/forum/SSI.php on line 60

And when I go to my forums....

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.


I haven't done anything to the site, they just happened a few minutes ago - anyone know what all this means?
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

Chris Cromer

It's having problems connecting to the database. Either your username, password, or server info is set wrong in Settings.php.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

damo1065

Quote from: Chris Cromer on July 28, 2004, 01:01:29 AM
It's having problems connecting to the database. Either your username, password, or server info is set wrong in Settings.php.

But I haven't changed anything over the last while....I'll check the Settings.php to see...
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

damo1065

Ah but sur...take a look at this. I went into my cpanel to see what was going on and this os what I found for my database name

DBI connect('mysql:localhost','root',...) failed: Too many connections at /usr/local/cpanel/Cpanel/Mysql.pm line 42

Also under Service Status
Server Load has a Red Light and 4.33 (1 cpu)

What in the name of beejesus does all this mean?

(BTW Thanks for the help...a wee bit simple y'see)
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

Chris Cromer

It looks like too many connections to mysql are opened currently. By any chance did you recently turn on persistent mysql connections in smf?

Anyway open up Settings.php and look for this:
$db_persist = 1;
then replace it with this:
$db_persist = 0;

That should hopefully fix it.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

damo1065

Quote from: Chris Cromer on July 28, 2004, 01:15:46 AM
It looks like too many connections to mysql are opened currently. By any chance did you recently turn on persistent mysql connections in smf?

Anyway open up Settings.php and look for this:
$db_persist = 1;
then replace it with this:
$db_persist = 0;

That should hopefully fix it.

I wouldn't know how to turn on persistant connections, so I don't think I did that. On my Settings.php - it already says $db_persist = 0;

It wouldn't have something to do with my server and no SMF would it?
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

Chris Cromer

Well that's extremly odd, line 60 of my SSI.php would only have executed if $db_persist was set to 1... so either you have more than one Settings.php and your reading the wrong one... or you have a different SSI.php than I do.

It partially is a problem with your host, since they are limiting the ammount of connections you can have to your mysql database. But the error is coming from persistent connections code in SSI.php, so changing it to not use persistent connections should fix this problem.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

damo1065

Quote from: Chris Cromer on July 28, 2004, 01:27:35 AM
Well that's extremly odd, line 60 of my SSI.php would only have executed if $db_persist was set to 1... so either you have more than one Settings.php and your reading the wrong one... or you have a different SSI.php than I do.

It partially is a problem with your host, since they are limiting the ammount of connections you can have to your mysql database. But the error is coming from persistent connections code in SSI.php, so changing it to not use persistent connections should fix this problem.

This is my line 60 from SSI.php
$db_connection = @mysql_connect($db_server, $db_user, $db_passwd) or die(mysql_error($db_connection));

And my Settings.php definatley has $db_persist  set to 0 - I've checked it 5-6 times.
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

Chris Cromer

Ok, so you have a different SSI.php file than I do. That is line 58 on mine.

Then this is definately a host problem. As I already said, they are limiting the ammount of connections you can have to the mysql database. So either they need to increase the ammount of connections you can have. Or you need to wait till the server activity dies down since this is caused by too many people connecting to it at once.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

damo1065

Quote from: Chris Cromer on July 28, 2004, 01:38:32 AM
Ok, so you have a different SSI.php file than I do. That is line 58 on mine.

Then this is definately a host problem. As I already said, they are limiting the ammount of connections you can have to the mysql database. So either they need to increase the ammount of connections you can have. Or you need to wait till the server activity dies down since this is caused by too many people connecting to it at once.

Okay - thanks very much for the help - it's much appreciated ;)
Wy not visit my site... The Gaff'll be bored to be honest, unless you're from Cork in Ireland

Advertisement: