Solved

MySql Connection Problems

Posted on 2004-08-16
7
857 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

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). …
This guide whil teach how to setup live replication (database mirroring) on 2 servers for backup or other purposes. In our example situation we have this network schema (see atachment). We need to replicate EVERY executed SQL query on server 1 to…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

777 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