Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Jul 2003
    Posts
    13

    Default MySQL restarts every few seconds

    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/showthr...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. #2
    Member
    Join Date
    May 2006
    Posts
    52

    Default

    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. #3
    Member
    Join Date
    Jul 2003
    Posts
    13

    Default

    #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. #4
    Member
    Join Date
    May 2006
    Posts
    52

    Default

    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. #5
    Member
    Join Date
    Jul 2003
    Posts
    13

    Default

    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. #6
    Member
    Join Date
    Jul 2003
    Posts
    13

    Default

    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. #7
    Member
    Join Date
    May 2006
    Posts
    52

    Default

    Firstly check your my.cnf file (/etc/my.cnf) - it could be pointing to the wrong mysql.sock file.

  8. #8
    Member
    Join Date
    Jun 2005
    Posts
    70

    Default

    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.

Similar Threads & Tags
Similar threads

  1. mySQL restarts automatically, every 2sec. error db
    By Icode in forum Database Discussions
    Replies: 3
    Last Post: 02-15-2011, 06:12 PM
  2. Cronjob in seconds
    By SystemJay in forum New User Questions
    Replies: 2
    Last Post: 10-13-2009, 11:49 PM
  3. mysql shows fail, yet restarts ok?
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 16
    Last Post: 02-24-2008, 10:44 PM
  4. Every day at 4.03am MySQL restarts
    By BahBah in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 02-22-2008, 03:14 AM
  5. mysql crashes or restart every 500 seconds
    By alexd in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-29-2005, 03:12 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube