Customizing SMF > SMF Coding Discussion

Getting the following error...

<< < (2/2)

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:

--- Code: ---$db_persist = 1;
--- End code ---
then replace it with this:

--- Code: ---$db_persist = 0;
--- End code ---

That should hopefully fix it.

--- End quote ---

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
--- Code: ---$db_persist = 0;
--- End code ---

It wouldn't have something to do with my server and no SMF would it?

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.

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.

--- End quote ---

This is my line 60 from SSI.php

--- Code: --- $db_connection = @mysql_connect($db_server, $db_user, $db_passwd) or die(mysql_error($db_connection));
--- End code ---

And my Settings.php definatley has $db_persist  set to 0 - I've checked it 5-6 times.

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.

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.

--- End quote ---

Okay - thanks very much for the help - it's much appreciated ;)

Navigation

[0] Message Index

[*] Previous page

Go to full version