Friday, August 23, 2013

error 503, service not available - Plesk Server

Almost every morning when logging into plesk panel i get the error message "error 503, service not available". after doing a "service psa restart" everything works again as it should. Means your plesk crashes such oftenly.

logs:
=====

DEBUGGER DETECTED... Bye!
2012-06-24 22:08:35: (mod_fastcgi.c.2613) unexpected end-of-file (perhaps the fastcgi process died): pid: 13042 socket: unix:/opt/psa/tmp/sw-engine.sock-0
2012-06-24 22:08:35: (mod_fastcgi.c.3357) child signaled: 9
2012-06-24 22:08:35: (mod_fastcgi.c.3400) response not received, request sent: 661 on socket: unix:/opt/psa/tmp/sw-engine.sock-0 for /login_up.php3?login_name=admin&passwd=0362092, closing connection
2012-06-25 07:47:29: (server.c.1543) server stopped by UID = 0 PID = 3593
2012-06-25 07:47:29: (log.c.166) server started
2012-06-25 07:47:56: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-06-25 07:59:39: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-06-25 08:13:03: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-06-25 08:58:00: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
2012-06-25 09:55:21: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe


Check with interesting logfiles beside of /opt/psa/admin/logs and /opt/psa/var/log?

Getting error when accessing plesk panel via web.

error_log:2012-06-24 07:27:44: (mod_fastcgi.c.3357) child signaled: 9
error_log:2012-06-24 22:08:35: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-17 13:18:49: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-17 22:29:50: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-20 19:54:46: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-21 03:24:27: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-23 03:06:06: (mod_fastcgi.c.3357) child signaled: 9
error_log.1:2012-06-23 03:10:22: (mod_fastcgi.c.3357) child signaled: 9

btw: i think i just found the reason why i'm not able to view logs via plesk panel although it looks like php was compiled with zlib:

error_log.1:2012-06-20 10:33:05: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/
htdocs/domains/logs/log_file_viewer.php on line 59
error_log.1:2012-06-20 10:33:11: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/
htdocs/domains/logs/log_file_viewer.php on line 59
error_log.1:2012-06-20 10:33:16: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/
htdocs/domains/logs/log_file_viewer.php on line 59
error_log.1:2012-06-20 10:33:22: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/
htdocs/domains/logs/log_file_viewer.php on line 59
error_log.1:2012-06-20 10:34:13: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/
htdocs/domains/logs/log_file_viewer.php on line 59
error_log.1:2012-06-20 10:34:16: (mod_fastcgi.c.2746) FastCGI-stderr: PHP Fatal error: Call to undefined function gzopen() in /opt/psa/admin/htdocs/domains/logs/log_file_viewer.php on line 59

Also

"503 - Service Not Available"

# cat /var/log/error_log
2012-07-01 20:43:48: (mod_fastcgi.c.2613) unexpected end-of-file (perhaps the fastcgi process died): pid: 4333 socket: unix:/opt/psa/tmp/sw-engine-8880.sock-0
2012-07-01 20:43:48: (mod_fastcgi.c.3357) child signaled: 9
2012-07-01 20:43:48: (mod_fastcgi.c.3400) response not received, request sent: 654 on socket: unix:/opt/psa/tmp/sw-engine-8880.sock-0 for /login_up.php3?login_name=admin&passwd=07081990, closing connection
2012-07-01 23:19:11: (connections.c.1762) SSL (error): 5 -1 32 Broken pipe
DEBUGGER DETECTED... Bye!
2012-07-04 01:25:02: (mod_fastcgi.c.2613) unexpected end-of-file (perhaps the fastcgi process died): pid: 28404 socket: unix:/opt/psa/tmp/sw-engine.sock-0
2012-07-04 01:25:02: (mod_fastcgi.c.3357) child signaled: 9
2012-07-04 01:25:02: (mod_fastcgi.c.3400) response not received, request sent: 659 on socket: unix:/opt/psa/tmp/sw-engine.sock-0 for /login_up.php3?login_name=admin&passwd=alois, closing connection


As a root user:

TRY : 

1. /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

2. Also try increasing the ulimit value

    - echo $ulimit
    - ulimit -n 131072 # sets ulimit value
    - In order to make this change permanent - add the following in /etc/sysctl.conf
        - fs.file-max = 131072
        - /sbin/sysctl -w fs.file-max=131072
3. Then mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "replace into misc (param,val) values ('apache_pipelog', 'true');"

4. /usr/local/psa/admin/sbin/httpdmng --reconfigure-all
5. /etc/init.d/httpd restart # restart httpd server.