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.

Strange load and MYSQL Problems

Discussion in 'General Discussion' started by hmm, May 25, 2006.

  1. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Hello,
    I am facing a really strange problem with my server these days.
    The server runs smoothly throughout the day but on random basis load just shoots up and things stop working...

    and when i stop httpd, it goes down and things start working well...i.e. load under 1..

    Now this clearly states that some of the php scripts are causing the problems. Now, to trace this I tried almost everything and traced out many scripts too...

    I got my work done from 2 different companies and both did great work and found the stuff but in the end problem still remains...

    We digged almost all the scripts, mainly wordpress blogs (we had to disable cache in those blogs), few were old mambo and PHPBB installations....

    I also disabled persistent connection in php.ini but nothing helps, the server stops working on random basis, top -c at that time also does not show any users taking high % of CPU or memory usage..

    Now, I have no idea how to trace it out, the downtime is killing my company....I am just keep on paying 100s of dollars to linux experts to fix this problem out but nothing worked well...problems stopped for sometime and started suddenly....

    2nd problem is with mysql, Many times I see one mysql process taking more than 7-8% of memory usage. When I do strace of that process, I see following output..

    Code:
    Process 3075 attached - interrupt to quit
    select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])
    fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
    accept(4, {sa_family=AF_FILE, path="«±FW "}, [2]) = 162
    fcntl64(4, F_SETFL, O_RDWR)             = 0
    getsockname(162, {sa_family=AF_FILE, path="/var/lib/mysql"}, [28]) = 0
    fcntl64(162, F_SETFL, O_RDONLY)         = 0
    fcntl64(162, F_GETFL)                   = 0x2 (flags O_RDWR)
    fcntl64(162, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    setsockopt(162, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
    futex(0x84f4d84, FUTEX_WAKE, 1)         = 1
    futex(0x84f4d80, FUTEX_WAKE, 1)         = 1
    futex(0x84f5070, FUTEX_WAKE, 1)         = 1
    select(5, [3 4], NULL, NULL, NULL)      = 1 (in [4])
    fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
    accept(4, {sa_family=AF_FILE, path="«±FW "}, [2]) = 162
    fcntl64(4, F_SETFL, O_RDWR)             = 0
    getsockname(162, {sa_family=AF_FILE, path="/var/lib/mysql"}, [28]) = 0
    fcntl64(162, F_SETFL, O_RDONLY)         = 0
    fcntl64(162, F_GETFL)                   = 0x2 (flags O_RDWR)
    fcntl64(162, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    setsockopt(162, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
    futex(0x84f4d84, FUTEX_WAKE, 1)         = 1
    futex(0x84f4d80, FUTEX_WAKE, 1)         = 1
    futex(0x84f5070, FUTEX_WAKE, 1)         = 1
    select(5, [3 4], NULL, NULL, NULL <unfinished ...>
    Process 3075 detached
    It repeats the line "setsockopt(162, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)" many times...and when I kill the process server load goes down...

    I checked the permissions of the /var/lib/myql folder but it was correct.

    My server is running on RHEL 4 with kernel 2.6.9-34.0.1.ELsmp

    MYSQL version is 4.1.18

    my.cnf as follows:

    Code:
    [mysqld]
    connect_timeout=15
    datadir=/var/lib/mysql
    interactive_timeout=50
    join_buffer=1M
    key_buffer=128M
    max_allowed_packet=16M
    max_connect_errors=10
    max_connections=150
    max_user_connections=25
    myisam_sort_buffer_size=64M
    query_cache_limit=1M
    query_cache_size=32M
    query_cache_type=1
    read_buffer_size=2M
    record_buffer=1M
    server-id=1
    skip-innodb
    skip-locking
    socket=/var/lib/mysql/mysql.sock
    sort_buffer_size=2M
    table_cache=1024
    thread_cache_size=128
    thread_concurrency=2
    wait_timeout=50
    
    [mysql.server]
    basedir=/var/lib
    user=mysql
    
    [safe_mysqld]
    open_files_limit=8192
    pid-file=/var/lib/mysql/mysql.pid
    
    [mysqldump]
    quick
    max_allowed_packet=16M
    
    [mysql]
    no-auto-rehash
    
    [isamchk]
    key_buffer=64M
    read_buffer=16M
    sort_buffer=64M
    write_buffer=16M
    
    [myisamchk]
    key_buffer=64M
    read_buffer=16M
    sort_buffer=64M
    write_buffer=16M
    
    [mysqlhotcopy]
    interactive-timeout
    The server runs on Dual Xeon 2.8 GHZ with 1 GB RAM

    Any kind of help is much appreciated.

    Thanks
    Deep
     
  2. azzawazzi

    azzawazzi Member

    Joined:
    Apr 21, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    We're having the exact same issue by the looks.

    I created another post before I had seen this one.

    If you find the answer could you PLEASE post it here???

    Also.. to help your load problem.. check this out: http://www.webhostingtalk.com/showpost.php?p=3691073&postcount=6

    We have done this on all of our Dual CPU servers, and it fixed the random high load issues... now it's made a return with this MySQL issue :(

    Thanks

    Azza
     
    #2 azzawazzi, May 26, 2006
    Last edited: May 26, 2006
  3. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    The link you gave is for CentOS kernel update, here I am running latest version of RHEL 4, 2.6.9 kernel which was released yesterday

    I digged more about the issue, I guess it is related to tmp tables created by mysql...

    Whenever tmp tables are created the load goes high....

    Deep
     
Loading...

Share This Page