Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

  1. #1
    Join Date
    Apr 2007
    Beans
    30
    Distro
    Ubuntu

    12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    I have a Linode running Ubuntu 12.04 LTS, current with all updates. Every morning for the last couple weeks, I've noticed that Apache is non-responsive. I have to restart (sudo service apache2 restart) to get it going again. Here are some server graphs:

    last 24 hours:


    last 30 days:


    I've checked /var/log/apache2, and the current error.log offers no suggestions:

    Code:
    [Sun Dec 15 06:29:11 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Sun Dec 15 06:29:28 2013] [notice] Graceful restart requested, doing restart
    [Sun Dec 15 06:29:29 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Mon Dec 16 19:09:52 2013] [notice] caught SIGTERM, shutting down
    [Mon Dec 16 19:11:36 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Mon Dec 16 19:28:17 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
    [Tue Dec 17 12:24:51 2013] [notice] caught SIGTERM, shutting down
    [Tue Dec 17 12:24:53 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Tue Dec 17 13:14:51 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
    [Wed Dec 18 16:00:42 2013] [notice] caught SIGTERM, shutting down
    [Wed Dec 18 16:00:43 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Wed Dec 18 17:31:15 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
    [Thu Dec 19 11:10:14 2013] [notice] caught SIGTERM, shutting down
    [Thu Dec 19 11:10:15 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 configured -- resuming normal operations
    [Thu Dec 19 11:46:23 2013] [error] server reached MaxClients setting, consider raising the MaxClients setting
    The SIGTERM is me restarting it.

    /var/log/syslog doesn't really offer any insights either. It's just filled with sendmail errors, but could those sendmail errors be contributing to the apache non-responsiveness?

    I'd love any advice I can get. I just don't know why this is happening.

    [edit]
    Digging around, I discovered that the entries in my /etc/hosts file for my domain were wrong. I corrected those, but I have no idea if that'll fix my apache issues. It ought to fix the sendmail errors at least.
    Last edited by Fangs404; December 20th, 2013 at 07:37 PM.

  2. #2
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Just curious but why would you need to have any entries in /etc/hosts when you can have them setup in DNS for your domain?

    When Apache fails to respond, is it still listed as listening on port 80?
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  3. #3
    Join Date
    Apr 2007
    Beans
    30
    Distro
    Ubuntu

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Quote Originally Posted by CharlesA View Post
    Just curious but why would you need to have any entries in /etc/hosts when you can have them setup in DNS for your domain?

    When Apache fails to respond, is it still listed as listening on port 80?
    The reason I edited /etc/hosts is because Linode's setup instructions say to do so.

    Good question about port 80.... I'll check the next time it happens (probably tomorrow). It was non-responsive again today.

  4. #4
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Interesting. I thought that was done automatically, but hey, if the instructions tell you to do it.. do it.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  5. #5
    Join Date
    Apr 2007
    Beans
    30
    Distro
    Ubuntu

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Hm, I'm not sure how to tell whether apache is listening on port 80. I tried "lsof -i" and saw nothing. netstat didn't really show anything either. Is there a specific command I should use?

  6. #6
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Code:
    sudo netstat -nlp | grep 80
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  7. #7
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,527
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Quote Originally Posted by CharlesA View Post
    Interesting. I thought that was done automatically, but hey, if the instructions tell you to do it.. do it.
    I suspect they suggest editing /etc/hosts because they don't expect most customers to run a DNS server. You can configure reverse DNS from the "remote access" screen in the server's dashboard. That creates a PTR record for your IP address pointing to the hostname you enter. Forward resolution requires a server providing DNS for your domain.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #8
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Quote Originally Posted by SeijiSensei View Post
    I suspect they suggest editing /etc/hosts because they don't expect most customers to run a DNS server. You can configure reverse DNS from the "remote access" screen in the server's dashboard. That creates a PTR record for your IP address pointing to the hostname you enter. Forward resolution requires a server providing DNS for your domain.
    I guess that makes sense. I've always added a DNS entry for both the main domain name and the server's hostname. Whatever works.
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

  9. #9
    Join Date
    Apr 2007
    Beans
    30
    Distro
    Ubuntu

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Quote Originally Posted by CharlesA View Post
    Code:
    sudo netstat -nlp | grep 80
    Ok, here's the output right now (apache stopped responding as expected last night and is currently not responding):

    Code:
    $ sudo netstat -nlp | grep 80
    tcp6       0      0 :::80                   :::*                    LISTEN      7018/apache2
    udp6       0      0 fe80::f03c:91ff:fe9:123 :::*                                2853/ntpd
    unix  2      [ ACC ]     STREAM     LISTENING     800      2307/dbus-daemon    /var/run/dbus/system_bus_socket
    So it's listening, it looks like. In fact, when I restart apache, I see similar output:

    Code:
    $ sudo service apache2 restart
     * Restarting web server apache2
     ... waiting                                                                                                                                           [ OK ]
    $ sudo netstat -nlp | grep 80
    tcp6       0      0 :::80                   :::*                    LISTEN      12760/apache2
    udp6       0      0 fe80::f03c:91ff:fe9:123 :::*                                2853/ntpd
    unix  2      [ ACC ]     STREAM     LISTENING     800      2307/dbus-daemon    /var/run/dbus/system_bus_socket
    So, the output is essentially identical, save for the different pid.

    Any ideas on what might be causing this? I just tried uninstalling (sudo aptitude remove apache2) and reinstalling (sudo aptitude install apache2), but I doubt that'll solve anything.

  10. #10
    Join Date
    Oct 2009
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 12.04LTS - Apache 2.2.22 stops responding nightly - need to restart every morning

    Apache2 isn't listening on IPv4? 0.0.0.0:80? It looks like it's currently listening on localhost (:::), are you running Varnish or another caching proxy?
    Last edited by CharlesA; December 26th, 2013 at 12:31 AM. Reason: noparse
    Come to #ubuntuforums! We have cookies! | Basic Ubuntu Security Guide

    Tomorrow's an illusion and yesterday's a dream, today is a solution...

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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