Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 06:38:59 AM

Pages: [1]   Go Down
  Print  
Author Topic: MySQL and Phpbb  (Read 876 times)
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« on: February 22, 2005, 12:25:17 PM »

I have been having a slowdown of Phpbb when I have approximatly 18 - 25 users of my forum. I receive several errors in the php error_log that indicate something is awry with Mysql.

Examples:

[15-Feb-2005 16:43:32] PHP Warning:  mysql_connect(): User fogu002_xmb1 has already more than 'max_user_connections' active connections in /home/fogu002/public_html/hmforum/db/mysql4.php on line 48

[19-Feb-2005 08:07:03] PHP Warning:  mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/fogu002/public_html/hmforum/db/mysql4.php on line 48

[22-Feb-2005 12:08:09] PHP Warning:  mysql_query(): Unable to save result set in /home/fogu002/public_html/hmforum/db/mysql4.php on line 118

Etc, etc. When I just visited my forum I received an error that read

Quote

DEBUG MODE

SQL Error : 1053 Server shutdown in progress


Shutdown? Huh?

I sent in a ticket to Support, who told me they won't help with any script problems and to ask here. At least they were nice enough to tell me the max connections is 50  Wink  great support....

phpbb version - 2.0.11
url - www.fogu.com/hmforum

My "max users online" displays as 50 from back when that phpbb worm was populating around, but I've never had that many actual users visiting the forum. Most of the time it's around 15, but it was up to 28 last night.
Logged
Lupine1647
Berserker Poster
*****
Offline Offline

Posts: 10868


« Reply #1 on: February 22, 2005, 01:02:08 PM »

It may be an issue as to PHPBB having a persistant connection started and not closing it. Also, anythign else with mysql such as scripts on your main site can also cause the problem.
Logged
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« Reply #2 on: February 22, 2005, 01:50:41 PM »

Quote from: Lupus1647
It may be an issue as to PHPBB having a persistant connection started and not closing it. Also, anythign else with mysql such as scripts on your main site can also cause the problem.


Isn't that 50 connections per database? My plan has 5 database's and Phpbb is using one of them. If Phpbb is using it's own database I don't believe it would affect connections to other scripts other than itself.
Logged
Lupine1647
Berserker Poster
*****
Offline Offline

Posts: 10868


« Reply #3 on: February 22, 2005, 01:53:37 PM »

yes, it is per database. You can have more than one script installed to a database, just not through fantastico.
Logged
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« Reply #4 on: April 05, 2005, 10:08:59 AM »

Problems happening again. Yesturday I had over 30 people logged on and no problems, but this morning I had 15 and received max_connection errors.

Code:

Warning: mysql_connect(): User fogu002_xmb1 has already more than 'max_user_connections' active connections in /home/fogu002/public_html/hmforum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/fogu002/public_html/hmforum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/fogu002/public_html/hmforum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


My other database (coppermine) is working just fine, so theoretically the phpbb database should also allow connections (yet it is not).  I can't see how the phpbb could support 30 the night before, then crash out when there's only half as many people. Suggestions? I have no way of knowing how many connections are currently being tried Sad
Logged
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« Reply #5 on: April 07, 2005, 03:04:38 PM »

From 17 users to "max_users_connections" 5 minutes later. oh joy Luff Ya

Code:

Warning: mysql_connect(): User fogu002_xmb1 has already more than 'max_user_connections' active connections in /home/fogu002/public_html/hmforum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/fogu002/public_html/hmforum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/fogu002/public_html/hmforum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Perhaps a wild spider going crazy? Is there any way to have a view of active connections to a database on L.P.? When it came back a few minutes later I only had 10 active users on my phpbb. 17 -> 50 -> 10 just doesnt make any sense.

The max_users error also prevents me from viewing the database via phpmyadmin.
Logged
Lupine1647
Berserker Poster
*****
Offline Offline

Posts: 10868


« Reply #6 on: April 07, 2005, 03:51:34 PM »

Could you make a phpinfo.php file with the following inside it
Code:
<?
phpinfo();
?>


Then can you tell me what it says under the MySql section about Max Connections?

edit by Jay: added a ']' to close the 'code' tags. Smile
Logged
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« Reply #7 on: April 08, 2005, 11:00:56 AM »

I don't actually have a max_connections in the phpinfo(). This is what mine has.

Code:

Active Persistent Links 0
Active Links 0
Client API version 4.0.22
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient

Directive Local Value Master Value
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket no value no value
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off


The "show variables;" command via phpmysql does confirm that the database is set for a max of 50 connections, connect_timout of 5, and a wait_timeout of 500.

I did some searching online and it's possible the culprit is the new fancy-dancy MSNbot. There's been several posts at various forums complaining about the bot dragging their sites down to a crawl. I know it does spider through my forum (although I've only seen 2 or 3 instances of the bot appear at once via my phpbb admin cp), so I modified my robots.txt file to exclude that directory. Now I just have to sit back and see if the problem occurs again.

*edit* nope, blocking msnbot did nothing to solve the problem. 21 users online according to phpbb and the max_user_connection appears. 4:15pm pst, error_log says it started at 4:08 and stopped at 4:14

*edit2*  now I'm back up to 25 users and no sign of the error. This is really baffling  Confused  ah, what fun  Surprised
Logged
Ryom
Spacescooter Operator
*****
Offline Offline

Posts: 39



« Reply #8 on: April 08, 2005, 11:10:27 PM »

What mods do you have installed?
Logged
Cher
Spaceship Navigator
*****
Offline Offline

Posts: 98



WWW
« Reply #9 on: April 11, 2005, 10:14:55 AM »

That's what I'm looking into next Smile  I haven't installed any mods in quite some time, so I don't know if one I have just doesn't work with the number of people on my forum. The error_log didn't register any max_user_connection errors over the weekend.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: