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 ... really F***ED up

Discussion in 'General Discussion' started by bin_asc, Feb 7, 2006.

  1. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    I keep getting this error when I try to access my forum, as for all php scripts that use mysql:

    mysql_pconnect(): #HY000Can't create a new thread (errno 11); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug
    /home/nano/public_html/includes/class_core.php on line 273

    This is when I run my forum.

    I did a tail -f on /var/log/mysqld.log and this is what i got (this is a 2 part error, 2 times failure ):

    Number of processes running now: 0
    060207 16:33:12 mysqld restarted
    060207 16:33:12 [Warning] Asked for 196608 thread stack, but got 126976
    060207 16:33:12 InnoDB: Started; log sequence number 0 43664
    /usr/sbin/mysqld: ready for connections.
    Version: '4.1.14-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
    A mysqld process already exists at Tue Feb 7 16:33:12 GMT+5 2006
    060207 16:49:58 [ERROR] Can't create thread to kill server
    060207 16:50:35 mysqld started
    060207 16:50:35 [Warning] Asked for 196608 thread stack, but got 126976
    060207 16:50:36 InnoDB: Started; log sequence number 0 43664
    /usr/sbin/mysqld: ready for connections.
    Version: '4.1.14-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)


    I have mysql 4.1.14-standard.
    OS: CentOS 4.2
    Plenty of RAM and space.

    The thing is I`ve let a guy to fix errors that I had with apache, but after he did what he did ( i don`t know what he did ),Mysql didn`t work no more.I mean processes work, i did a /scripts/upcp --force ( still doesn`t work),/scripts/fixmysql - still doesn`t work, /scripts/mysqlup --force -- STILL DOESN`T WORK.
    Please help me.

    Reagrds,
    Adrian
     
    #1 bin_asc, Feb 7, 2006
    Last edited: Feb 7, 2006
  2. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    you should learn more about mysql. but, first try disable pconnect in your server php.ini
     
  3. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    I need fixing, please post suggestions not things like "you should get a manual .... things like that ".
    I already tried to disable persistent connections and it didn`t work.
     
  4. rustelekom

    rustelekom Well-Known Member
    PartnerNOC

    Joined:
    Nov 13, 2003
    Messages:
    290
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    moscow
    in this case you should give more information to forum visitors - number of mysql processes, mysql variables, number of httpd processes and etc. and even if you post this information here, it may be not help you, because honestly this is mysql optimization problem and it will require most likely access to server and monitoring within a day or more all processes on your server for finding what happen and where problem exist.
     
  5. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA

    and if the server is getting enough traffic, all the tweaks in the world might not help you. You may just need a cluster of 300 - 400 machines working together. By asking "please just tell me how to fix it" ..that's not going to help us help you . Unless you want us to say something like use a big hammer and bash it to hell until you see no more lights and no more sound. That should fix the mysql problem for you.
     
  6. bin_asc

    bin_asc Well-Known Member

    Joined:
    Jul 18, 2005
    Messages:
    280
    Likes Received:
    0
    Trophy Points:
    16
    Like, tell me what to post here and I`ll do that. ;)
     
  7. netkinetics

    netkinetics Well-Known Member

    Joined:
    May 14, 2004
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Home is Baltimore, MD - Currently in the Philippin
    Someone's really screwed up your MySQL server.

    In this order :

    Stop mysql conventionally : /etc/rc.d/init.d/mysql stop

    Be sure it died : ps auxw | grep mysql

    You may have to kill a out of control process. Your system may have plenty of ram but something is telling me that one particular mysql child has taken a major footprint in the cache preventing your restart or other children from forking. I'd need to see the output of your ps or top screen to tell you.

    If its NOT dead, you can try it with a killall (signal 9 , term, etc .. ) then try re-starting.

    Because its been hosed a bit, I then recommend (at the least)

    tar -czvf /var/lib/mysql/mysql/*.MYI /root/mysql.system.backup.tar.gz

    once done

    myisamchk -r /var/lib/mysql/mysql/*.MYI

    (could also try -o)

    .. as well as (if possible) doing this on whatever db was being accessed when the problem happened.

    Then try re-starting.

    Still no good? Post back what's in the .err file named after your system's hostname found in /var/lib/mysql.

    Also ensure user/group mysql own everything in /var/lib/mysql

    HTH
     
Loading...

Share This Page