Solved

MySql Connection Problems

Posted on 2004-08-16
7
852 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
ID: 11813129
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
ID: 11813642
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
ID: 11813780
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
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 3

Expert Comment

by:KarveR
ID: 11814378
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
ID: 11814383
that should be du -H
0
 
LVL 1

Expert Comment

by:magicMush
ID: 11911285
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

895 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

14 Experts available now in Live!

Get 1:1 Help Now