The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL restarts every few seconds

Discussion in 'General Discussion' started by 1EightT, Jun 17, 2006.

  1. 1EightT

    1EightT Member

    Joined:
    Jul 2, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Alright guys, I am in desperate need of help. I upgraded to MySQL 5, then ran easyapache. Everything was seemingly fine, then this morning I noticed that sql has been restarting every few seconds. What gives? Any way to roll back? I've got a couple hundred sites on my server that are no longer working, or are not working properly.

    One of my vbulletin sites keeps throwing the following error (just shows that mysql keeps restarting):


    Database error in vBulletin 3.5.0:

    Invalid SQL:

    UPDATE session
    SET lastactivity = 1150597768, location = '/forums/showthread.php?t=21856&page=3', inthread = 21856, incalendar = 0, badlocation = 0, useragent = 'Mozilla/5.0 (compatible; BecomeBot/2.3; MSIE 6.0 compatible; +http://www.become.com/site_owners.html)'
    WHERE sessionhash = 'fa86503864c1c161083ab5f930bb4179';

    MySQL Error : MySQL server has gone away
    Error Number : 2006
    Date : Saturday, June 17th 2006 @ 08:29:29 PM
    Script : http://www.mysite.com/forums/showthread.php?t=21856&page=3
    Referrer : http://www.mysite.com/forums/showthread.php?t=21856
    IP Address : xx.xxx.xx.xx
    Username : Unregistered
    Classname : vb_database

    I've had a few thousand of these errors today.
     
  2. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Show us the output of :

    tail /var/lib/mysql/hostname-of-your-box.err
    and tail /var/log/mysqld.log

    This may give us clues to the problem.
     
  3. 1EightT

    1EightT Member

    Joined:
    Jul 2, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    #crusher#:/> tail /var/lib/mysql/crusher.sportcompactracing.com.err
    ipaddress = '65.214.44 .42',
    refer_url = ''
    thd->thread_id=5
    The manual page at http://www.mysql.com/doc/en/Crashing.html contains
    information that should help you find out what is causing the crash.

    Number of processes running now: 0
    060617 20:52:25 mysqld restarted
    060617 20:52:25 [Note] /usr/sbin/mysqld: ready for connections.
    Version: '5.0.21-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MyS QL Community Edition - Standard (GPL)



    and

    #crusher#:/> tail /var/log/mysqld.log
    050902 08:31:47 mysqld started
    050902 8:31:48 [Warning] Asked for 196608 thread stack, but got 126976
    050902 8:31:48 [ERROR] Can't start server : Bind on unix socket: No such file or directory
    050902 8:31:48 [ERROR] Do you already have another mysqld server running on socket: /home/virtual/FILESYSTEMTEMPLATE/.mysqlsock/mysql.sock ?
    050902 8:31:48 [ERROR] Aborting

    050902 8:31:48 [Note] /usr/sbin/mysqld: Shutdown complete

    050902 08:31:48 mysqld ended


    Is it trying to run multiple instances of sql?
     
  4. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Looks like we need to see a bit more of the first log.

    cat /var/lib/mysql/crusher.sportcompactracing.com.err

    It looks like you may need to recompile MySQL again. Either that or your server is running out of memory?
     
  5. 1EightT

    1EightT Member

    Joined:
    Jul 2, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I've got 8gb of ram, so I don't think it's memory.

    Here are a few of the results from the last command you gave me. I got a few thousand lines like this.

    040919 20:39:00 Aborted connection 3140708 to db: 'perform_google' user: 'root' host: `localhost' (Got an error reading communication packets)
    040919 20:39:01 Aborted connection 3140714 to db: 'perform_google' user: 'root' host: `localhost' (Got an error reading communication packets)
    040919 20:43:31 Aborted connection 3140903 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:45:49 Aborted connection 3141320 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:47:51 Aborted connection 3141604 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:50:16 Aborted connection 3141966 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:53:13 Aborted connection 3142361 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:57:22 Aborted connection 3142811 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 20:57:40 Aborted connection 3142860 to db: 'highalti_forums' user: 'highalti_admin' host: `localhost' (Got timeout reading communication packets)
    040919 21:00:04 Aborted connection 3143216 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
    040919 21:04:13 Aborted connection 3143770 to db: 'perform_newperf' user: 'perform_admin' host: `localhost' (Got timeout reading communication packets)
    040919 21:05:08 Aborted connection 3143689 to db: 'eximstats' user: 'eximstats' host: `localhost' (Got timeout reading communication packets)
     
  6. 1EightT

    1EightT Member

    Joined:
    Jul 2, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    How would I go about manually recompiling mysql? Any documentation or tutorials you can point me toward?

    I appreciate all the help so far
     
  7. Echelon17

    Echelon17 Well-Known Member

    Joined:
    May 21, 2006
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    Firstly check your my.cnf file (/etc/my.cnf) - it could be pointing to the wrong mysql.sock file.
     
  8. encryption

    encryption Well-Known Member

    Joined:
    Jun 24, 2005
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    6
    I'm having the exact same error after upgrading to version 5. My my.cnf hasnt been altered since we were on the previous version and it ran fine then.
     
Loading...

Share This Page