Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, First of all thank you for your time helping me out. I am losing customers as we are talking because of this. Okay so I bought a dedicated server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Senethic's Avatar
    Join Date
    Oct 2012
    Location
    Netherlands
    Posts
    24

    Exclamation CentOS Linux 6.3 - Crashing


    Hello,

    First of all thank you for your time helping me out.
    I am losing customers as we are talking because of this.

    Okay so I bought a dedicated server with Intel(R) Atom(TM) CPU N2800 - 1.86GHz, 4 cores and 2 GB ram.

    I'm running CentOS Linux 6.3 and installed apache,mysql,php etc.
    Kernel Linux 3.2.13 -grsec-xxxx -grs-ipv6-64 on x86_64

    After running it for a day I came back and my server has seemed to be crashed.
    I couldn't access it thru putty and it wasn't responding anymore. This also ment that the website is offline which was my biggest fear.

    What I must point out that the hardware is very busy processing stuff because the website gets alot of visitors.
    CPU hits 100% from time to time. I even saw MYSQL get to 300% sometimes.

    After looking in some logs I saw some stuff.

    httpd log - This is me hardbooting the server after the crash.
    Code:
    [Sat Nov 17 11:42:49 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Sat Nov 17 11:42:49 2012] [notice] Digest: generating secret for digest authentication ...
    [Sat Nov 17 11:42:49 2012] [notice] Digest: done
    [Sat Nov 17 11:42:49 2012] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 configured -- resuming normal operations


    The crash happend at 05:55:15 AM


    Thanks once again.

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,392
    The four loglines dont tell much.
    Just that the apache config is without syntax errors and apache is able to start.

    Do you get any error logs for
    - hardware
    - apache
    - php
    - mysql

    As you have seen high load, the monitor metrics are of interest.
    What patterns can you see for cpu, io, memory, network, etc?

    Lastly, a atom with 2gb and some undisclosed disc(s) is not meant for high performance.
    This hardware can easily be brought to its limits.
    You must always face the curtain with a bow.

  3. #3
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    896
    If you're getting an unusually high amount of traffic, then you need to consider putting a firewall in front of this box that has connection limits as you may be getting DDOSed.

    Next, you need to tune Apache:
    You can, and should, control the MaxClients setting so that your server does not spawn so many children it starts swapping.
    Apache Performance Tuning - Apache HTTP Server

    Next, you need to check your httpd logs. Super high MySQL resource usage normally means broken website. Something is not working right in your code.

  4. #4
    Just Joined! Senethic's Avatar
    Join Date
    Oct 2012
    Location
    Netherlands
    Posts
    24
    Quote Originally Posted by Irithori View Post
    The four loglines dont tell much.
    Just that the apache config is without syntax errors and apache is able to start.

    Do you get any error logs for
    - hardware
    - apache
    - php
    - mysql

    As you have seen high load, the monitor metrics are of interest.
    What patterns can you see for cpu, io, memory, network, etc?

    Lastly, a atom with 2gb and some undisclosed disc(s) is not meant for high performance.
    This hardware can easily be brought to its limits.
    I have checked those, haven't got anything out of them tho. And yeah the hardware is pretty bad considered how much traffic I get.
    I've had it on another dedi before which it handles perfectly.

    It ran the same software.

    Quote Originally Posted by mizzle View Post
    If you're getting an unusually high amount of traffic, then you need to consider putting a firewall in front of this box that has connection limits as you may be getting DDOSed.

    Next, you need to tune Apache:

    Apache Performance Tuning - Apache HTTP Server[/url]

    Next, you need to check your httpd logs. Super high MySQL resource usage normally means broken website. Something is not working right in your code.
    Actually I have cloudflare as a reverse proxy.
    Its not a DDoS or something like that. I'm pretty sure its just a huge overload of incomming connections which the CPU doesn't handle.
    Anyway I'll check the logs tomorrow I don't really have time at the moment.

    Thank you for your time and input

  5. #5
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Hey, have you considered nginx as your webserver? It is based on asynchronous transactions and is supposed to handle multiple simultaneous connections better than Apache (or so the theory goes).

    You should also consider redundancy as a fall-back, for when your primary flat lines.

  6. #6
    Just Joined! Senethic's Avatar
    Join Date
    Oct 2012
    Location
    Netherlands
    Posts
    24
    Hey guys,

    First of all thank you very much for helping me.
    I've come to known that the CPU is handling it pretty well until night.
    At night I have the most visitors and it just doesn't really like it.

    It freezes up and thats when **** began to happen.
    I've installed Plesk which reboots the server and automatically starts up apache/mysql/php again.
    Its a temporarely fix for now.
    Once I got some more money I'll upgrade the hardware and everything should be fixed.
    (When i had this site on my other dedicated server it ran without any problems just because the hardware is way better).

    Thank you once again

    Regards,

    Senethic

  7. #7
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    896
    You really should adjust your apache config file as I stated before. This will keep you from having to reboot your server.

  8. #8
    Just Joined! Senethic's Avatar
    Join Date
    Oct 2012
    Location
    Netherlands
    Posts
    24
    Quote Originally Posted by mizzle View Post
    You really should adjust your apache config file as I stated before. This will keep you from having to reboot your server.
    Yep I will

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •