Jump to content

Frequent 500 Errors


Neo
 Share

Recommended Posts

Hi,

I am running ProcessWire 3.0.62 on a 512 MB VPS with CentOS 7.3.1611 x64.

The site operates stable for a couple of days and then suddenly shuts down with an internel server error - 500.

I first thought this might be a caching issue and I disabled mod_pagespeed, but the problem persists.

 

I noticed the following errors in the ProcessWire log that match this timeframe:

Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /var/www/html/wire/core/WireDatabasePDO.php line 454)

Error: Exception: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away (in /var/www/html/wire/core/PagesLoader.php line 1110)

Error: Exception: SQLSTATE[HY000] [2002] Connection refused (in /var/www/html/wire/core/ProcessWire.php line 377)

 

Having a look at /var/log/httpd/error_log shows the following entries:

[Mon Apr 30 03:36:02.299543 2018] [auth_digest:notice] [pid 835] AH01757: generating secret for digest authentication ...
[Mon Apr 30 03:36:02.300730 2018] [lbmethod_heartbeat:notice] [pid 835] AH02282: No slotmem from mod_heartmonitor
[Mon Apr 30 03:36:02.496198 2018] [mpm_prefork:notice] [pid 835] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.1.16 configured -- resuming normal operations
[Mon Apr 30 03:36:02.496220 2018] [core:notice] [pid 835] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Apr 30 08:58:41.709509 2018] [mpm_prefork:notice] [pid 835] AH00170: caught SIGWINCH, shutting down gracefully
[Mon Apr 30 11:59:04.905878 2018] [suexec:notice] [pid 832] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message
[Mon Apr 30 11:59:05.452221 2018] [auth_digest:notice] [pid 832] AH01757: generating secret for digest authentication ...
[Mon Apr 30 11:59:05.456054 2018] [lbmethod_heartbeat:notice] [pid 832] AH02282: No slotmem from mod_heartmonitor
[Mon Apr 30 11:59:05.922452 2018] [mpm_prefork:notice] [pid 832] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.1.16 configured -- resuming normal operations
[Mon Apr 30 11:59:05.922522 2018] [core:notice] [pid 832] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

There is nothing in the log that would immediately catch my attention regarding this 500 error.

If I reboot the server the site operates normally again.

 

Would appreciate your assistance to find the problem.

Thanks

Link to comment
Share on other sites

mySQL server has gone away - well, seems like your DB has some hickups.

5 hours ago, Neo said:

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using ::1. Set the 'ServerName' directive globally to suppress this message

This sounds like the server setup is not kosher.

Have you done any upgrades lately? (Apache, PHP, mySQL... config)

Link to comment
Share on other sites

To provide further details regarding the server configuration:

httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built:   Oct 19 2017 20:39:16

----------

php -v
PHP 7.1.16 (cli) (built: Mar 28 2018 13:19:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.16, Copyright (c) 1999-2018, by Zend Technologies

----------

mysql -V
mysql  Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1

 

I could post the complete php.ini if required, but will share some key values for the moment:

output_buffering = 4096
max_input_time = 60
memory_limit = 128M
post_max_size = 8M
upload_max_filesize = 2M
max_file_uploads = 20
default_socket_timeout = 60

 

Http and database are running:

sudo netstat -plunt | grep httpd
tcp6       0      0 :::80                   :::*                    LISTEN      832/httpd           
tcp6       0      0 :::443                  :::*                    LISTEN      832/httpd 

sudo netstat -plunt | grep mysql
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1085/mysqld 

 

Last updates have been installed in March, but this is an issue that happened before.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...