1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Apache constantly crashing every few hours after php update

Discussion in 'Apache' started by undertheidea, Jan 19, 2019.

  1. #1
    Server Details:
    Ubuntu 16.0.4.5 LTS
    Server version: Apache/2.4.18 (Ubuntu)
    PHP Version: PHP 7.2.14-1+ubuntu16.04.1+deb.sury.org+1
    Server with 16GB of RAM, 8 Core CPU

    Server Logs/Setup Configs will be posted at bottom of post.

    I currently run PHP using the PHP-FPM. I have had it working just fine, until recently I believe, when PHP had some updates, and I updated it a few days ago.

    Now, every few hours, it just seems that Apache crashes and I just have to start it back up. The server load isn't that big though. It is basically my own server that I pretty much use for myself. So I doubt it is anything related to the performance of the server/apache. (I mean, how much can I do myself).

    Apache error log doesn't seem to point to much. This happened before, when I first migrated to PHPFPM. But I had some default settings for PHPFPM, so I just increased the settings, and was good.

    Lot of the settings I chose for PHPFPM were done via this guide:
    https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534

    The only thing different now, is that this issue popped up once I updated PHP (I was on PHP 7.2.13). I have updated PHP before with no issues. Except this time, it did ask me to replace the php.ini file (or keep current version). I replaced it, and then just put my php configs back ini, which only consisted of max_execution_time being set to 360 and memory_limit to 768M. But other than that, not much else has changed.

    So not sure where to go from here. I thought about ditching PHPFPM and go back to modphp, as I don't specifically need the performance gains of PHP-FPM. It is basically only me using and accessing the server. But I still want to figure this out anyways

    Apache Log (/var/log/apache2/error.log)
    20:40 looks to be when it crashed, 20:45 is when I restarted Apache
    php-fpm error log doesn't seem to point to anything. At the time of apache shutdown, there was nothing.

    These are my settings for relevant PHP/apache:
    SEMrush
    apache.conf
    /etc/php/7.2/fpm/php-fpm.conf
    /etc/php/7.2/fpm/pool.d/www. conf
    /etc/apache2/mods-available/mpm_event.conf
     
    undertheidea, Jan 19, 2019 IP
    SEMrush
  2. hostechsupport

    hostechsupport Well-Known Member

    Messages:
    411
    Likes Received:
    23
    Best Answers:
    7
    Trophy Points:
    138
    #2
    Do you see multiple suspicious connections when Apache crashes? Also which http error code you see on your webpage during this crash?
     
    hostechsupport, Jan 22, 2019 IP
  3. undertheidea

    undertheidea Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #3
    I don't know about the connections to Apache. Actually, I just checked my access.log and it is empty. Probably should fix that

    And I don't know the http error code. :p I mainly noticed it via my web irc page going down (but I would only see the software error message).

    But, I was tinkering around with things more. I went back from PHP-FPM to running PHP as an Apache module. But was still getting the crashes. So not sure it was PHP-FPM. Last night, I ended up uninstalling Apache, then reinstalling Apache. Re-enabled PHP-FPM with those same settings above. And so far, it has been running fine. So not sure what might have happened. Maybe something during the PHP update shook somethings, I don't know.
     
    undertheidea, Jan 22, 2019 IP
  4. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    219
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #4
    If this happens again, you can change the LogLevel in the Apache configuration (/etc/apache2/apache2.conf) to debug, to get some extra details in the log files.

    It should look like the following:
    LogLevel debug
    Code (markup):
     
    RoseHosting, Jan 23, 2019 IP