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.

Nginx , Apache , Mysql , Memcache with server 4G ram. How optimize ?

Discussion in 'Workarounds and Optimization' started by TomLone, Jun 11, 2012.

  1. TomLone

    TomLone Registered

    Joined:
    Jun 11, 2012
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    i have 1 dedicated server with Nginx proxy for Apache. Memcache, mysql, 4G Ram.

    These day, my visitor on my site wasn't increased, but my server get overload always in some specified time. (9AM - 15PM)

    Ram in use is increased second by second to full. that's moment, my server will get overload.

    i have to kill all apache , mysql service and reboot it to get free memory. and it'll full again. that's the terrible circle.

    here is my ram in use at the moment 160(nginx) 220(apache) 512(memcache) 924(mysql) here's process number 4(nginx) 14(apache) 5(memcache) 20(mysql)

    and here's my my.cnf config. someone can help me to optimize it?

    Code:
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    user=mysql
    skip-locking 
    skip-networking 
    skip-name-resolve
    
    # enable log-slow-queries
    log-slow-queries = /var/log/mysql-slow-queries.log
    long_query_time=3
    
    max_connections=200
    wait_timeout=64
    connect_timeout = 10
    interactive_timeout = 25
    thread_stack = 512K
    max_allowed_packet=16M 
    table_cache=1500 
    read_buffer_size=4M 
    join_buffer_size=4M 
    sort_buffer_size=4M
    read_rnd_buffer_size = 4M 
    max_heap_table_size=256M 
    tmp_table_size=256M 
    thread_cache=256 
    query_cache_type=1 
    query_cache_limit=4M 
    query_cache_size=16M 
    thread_concurrency=8
    myisam_sort_buffer_size=128M 
    # Disabling symbolic-links is recommended to prevent assorted security risks 
    symbolic-links=0 
    [mysqldump] 
    quick 
    max_allowed_packet=16M 
    
    [mysql] 
    no-auto-rehash 
    
    [isamchk] 
    key_buffer=256M 
    sort_buffer=256M 
    read_buffer=64M 
    write_buffer=64M 
    
    [myisamchk] 
    key_buffer=256M 
    sort_buffer=256M 
    read_buffer=64M 
    write_buffer=64M 
    
    [mysqlhotcopy] 
    interactive-timeout 
    
    [mysql.server]
    user=mysql
    basedir=/var/lib
    
    [mysqld_safe]
    log-error=/var/log/mysqld.log
    pid-file=/var/run/mysqld/mysqld.pid
     
Loading...

Share This Page