Solved

MySql Connection Problems

Posted on 2004-08-16
7
845 Views
Last Modified: 2009-12-16
I have a vBulletin and I was over at vbulletin.com asking around before I came over there. Their only reply was "There's something wrong w/ your mysql server."

Well HELLO CAPTAIN OBVIOUS...

Anyway... Here's whats going on.

I have a server that has between 300-600 consistent connections to the message board. We house the server in house (15 feet from where i am now) and I have full root access to everything.

The only thing running on the server is our message board. Everytime the mysql server cannot connect it gives the user a webpage that says this basically "Database error, please contact tech support @ etc etc etc".

At that time, an email then gets sent to me:

Database error in vBulletin :

Link-ID == false, connect failed
mysql error:

mysql error number: 0

Date: Sunday 15th of August 2004 06:55:33 PM
Script: http://board.mysite.com/forums/
Referer:
IP Address: 68.42.29.106

-------------

Another note: There are currently 450 users on my site right now that seem to be browsing seemlessly. (They could be encountering errors, but i' not sure as I'm not receiving any errors on my screen.)

Our database connection string is correct and the site is working, but a lot of people are getting this failed connect error. We're running Redhat 7 with Mysql.

Any help or direction would be appreciated. I'm fairly new at this mysql stuff.

Thanks
0
Comment
Question by:sneidig
  • 3
  • 2
7 Comments
 

Author Comment

by:sneidig
Comment Utility
Somethign I forgot to mention.

When these errors occur, i get an email (as stated above), but they are occuring so often that i'm getting 4-10 notifications (emails) a second.

I've got 20,000 pieces of mail right now! argh!
0
 
LVL 3

Accepted Solution

by:
KarveR earned 500 total points
Comment Utility
check in /var/lib/mysql, there should be a <servername>.err log file, check that for errors, when did you last restart mysql / the server / apache ?

perhaps a restart of mysql will sort the problem ? #> service mysqld restart

really need the *.err log output for more meaningful help, you may have used a mysql_pconnect somewhere, this can result in using up al available connections too quickly.

//karv
0
 

Author Comment

by:sneidig
Comment Utility
Here are todays Results: There was nothiing prior to today stuff except some stuff back in May.


040816  7:05:32  /usr/sbin/mysqld: Normal shutdown

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4857379  user: 'root'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4857377  user: 'root'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4847689  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4847659  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811408  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811407  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811406  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811405  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811404  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811403  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811402  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811401  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811400  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811399  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811398  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811397  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811396  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811395  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811394  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811393  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811392  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811391  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811390  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing close of thread 4811389  user: 'tmpboard'

040816  7:05:33  /usr/sbin/mysqld: Forcing clo040816 07:07:45  mysqld started
040816  7:07:46  InnoDB: Started
040816  7:07:47  Could not use board-relay-bin for logging (error 28). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.
040816  7:07:47  Failed in open_log() called from init_relay_log_info()
040816  7:07:47  Failed to initialize the master info structure
/usr/sbin/mysqld: ready for connections.
Version: '4.0.18-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040816  7:15:41  /usr/sbin/mysqld: Normal shutdown

040816  7:15:41  InnoDB: Starting shutdown...
040816  7:15:43  InnoDB: Shutdown completed
040816  7:15:43  /usr/sbin/mysqld: Shutdown Complete

040816 07:15:43  mysqld ended

040816 07:17:49  mysqld started
040816  7:17:51  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.18-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040816  7:24:39  Note: Retrying repair of: './forum/vb3_postindex' with keycache
040816  7:34:13  Note: Retrying repair of: './forum/vb3_postindex' with keycache
040816  7:36:01  Note: Retrying repair of: './forum/vb3_word' with keycache
040816  7:38:38  Note: Retrying repair of: './forum/vb3_postindex' with keycache
040816  7:40:28  Note: Retrying repair of: './forum/vb3_word' with keycache
040816  7:52:56  Note: Retrying repair of: './forum/vb3_postindex' with keycache
040816  7:54:49  Note: Retrying repair of: './forum/vb3_word' with keycache
040816  7:56:28  /usr/sbin/mysqld: Normal shutdown

040816  7:56:28  InnoDB: Starting shutdown...
040816  7:56:30  InnoDB: Shutdown completed
040816  7:56:30  /usr/sbin/mysqld: Shutdown Complete

040816 07:56:31  mysqld ended

040816 07:58:51  mysqld started
040816  7:58:52  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.18-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040816  8:14:21  /usr/sbin/mysqld: Normal shutdown

040816  8:14:21  InnoDB: Starting shutdown...
040816  8:14:23  InnoDB: Shutdown completed
040816  8:14:23  /usr/sbin/mysqld: Shutdown Complete

040816 08:14:23  mysqld ended

040816 08:16:42  mysqld started
040816  8:16:44  InnoDB: Started
/usr/sbin/mysqld: ready for connections.
Version: '4.0.18-standard'  socket: '/var/lib/mysql/mysql.sock'  port: 3306
040816  8:27:37  Note: Found 230401 of 142178 rows when repairing './forum/vb3_word'
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 3

Expert Comment

by:KarveR
Comment Utility
Check you have sufficient disk space for mysql, from root:
#> du -h
and see if any are at or very close to 100% , you may need to move mysql's data dir to another filesystem

once done, check all tables and rebuild any duff indexes.

this is probably relevant too http://dev.mysql.com/doc/mysql/en/Maintenance_schedule.html
0
 
LVL 3

Expert Comment

by:KarveR
Comment Utility
that should be du -H
0
 
LVL 1

Expert Comment

by:magicMush
Comment Utility
Most likely this is due to high connection load to your MySQL server.

you can use
mysql_pconnect() to connect to MySQL servers with high load.

this is a persistence connection and it is not recommended for servers that do not have high loads since the connection will be kept open.

check
http://uk2.php.net/manual/en/function.mysql-pconnect.php
for detailed information of mysql_pconnect() which will give give clearer idea what i am going on about :)

hope this will help.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now