• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Nginx 502 BAD GATEWAY

Thanks, I did these changes also, and here is more details about the problem (because 502 Bad Gateway nginx error is still there)

Code:
==> /var/log/apache2/error.log <==
[Wed Jan 07 06:33:14 2015] [notice] Graceful restart requested, doing restart

==> /usr/local/psa/admin/logs/panel.log <==
[2015-01-07 06:33:14] DEBUG [util_exec] [af186e926371bd4235ec4f683cf56f15][0] Finished in 0.26633s, Error code: 0
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][0] Starting: nginx-config -w /var/www/vhosts/system/monblogtest2015-2.fr/conf/nginx.conf
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][0] Finished in 0.01258s, Error code: 0
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][1] Starting: nginx-config -l /var/www/vhosts/system/monblogtest2015-2.fr/conf/nginx.conf:/etc/nginx/plesk.conf.d/vhosts/monblogtest2015-2.fr.conf
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][1] Finished in 0.0127s, Error code: 0
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][2] Starting: nginx-config -w /etc/nginx/conf.d/zz010_psa_nginx.conf
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][2] Finished in 0.0125s, Error code: 0
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][3] Starting: nginx-config -t
[2015-01-07 06:33:14] DEBUG [util_exec] [b239989bcb6386e3cef8b0a6da9197a6][3] Finished in 0.02839s, Error code: 0
[2015-01-07 06:33:14] DEBUG [util_exec] [a4c2e8fe4d16988587f34985630389d3][0] Starting: nginx_control --reload
[2015-01-07 06:33:14] DEBUG [util_exec] [a4c2e8fe4d16988587f34985630389d3][0] Finished in 0.03027s, Error code: 0

==> /var/www/vhosts/system/yamato.xxx.com/logs/error_log <==
[Wed Jan 07 06:33:17 2015] [emerg] [client 106.208.6.132] (22)Invalid argument: mod_fcgid: can't lock process table in pid 2919, referer: http://yamato.xxx.com/user/my_blogs

==> /var/www/vhosts/system/yamato.xxx.com/logs/proxy_error_log <==
2015/01/07 06:33:17 [error] 2924#0: *1 upstream prematurely closed connection while reading response header from upstream, client: 106.208.6.132, server: yamato.xxx.com, request: "POST /user/my_blogs HTTP/1.1", upstream: "http://37.187.161.189:7080/user/my_blogs", host: "yamato.xxx.com", referrer: "http://yamato.xxx.com/user/my_blogs"

==> /var/log/apache2/error.log <==
[Wed Jan 07 06:33:17 2015] [notice] Digest: generating secret for digest authentication ...
[Wed Jan 07 06:33:17 2015] [notice] Digest: done
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `ns336055.ip-37-187-161.eu' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `xxx.com' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?
[Wed Jan 07 06:33:18 2015] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Wed Jan 07 06:33:18 2015] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fcgid/2.3.9 mod_ssl/2.2.22 OpenSSL/1.0.1e mod_wsgi/3.3 Python/2.7.3 mod_perl/2.0.7 Perl/v5.14.2 configured -- resuming normal operations

I can see that first, apache graceful restart is asked, and after that mod_fcgid has a problem locking a process (because of apache restart I suppose) and then proxy prematurely close the connexion.

Is there a problem with apache graceful restart when mod_fcgid is active ?
 
Hi Bourgois_Christophe,

well, IF there would be a problem with the restarts, you could try to switch to a debug - level mode on panel.ini, apache, nginx and php5-fpm as well, for further investigations.
Please include as well the corresponding sw-cp-server - logs, after switching to the debug - log - level for your next test.
 
Ok once a time thanks for your help.

So I did configurations to get debug info everywhere and here is what I get.

In panel.log, there is no error and I can see the response to the request at the end of the log :
Code:
==> /var/log/plesk/panel.log <==
[2015-01-09 05:21:07] DEBUG [panel] init Agent
[2015-01-09 05:21:07] DEBUG [panel] <packet>
  <site>
   <add>
      <gen_setup>
        <name>monblogtest2015-4.fr</name>
        <webspace-id>1</webspace-id>
      </gen_setup>
<hosting>
            <vrt_hst>
              <property>
                <name>seo-redirect</name>
                <value>www</value>
              </property>
              <property>
                <name>fp</name>
                <value>false</value>
              </property>
              <property>
                <name>fp_ssl</name>
                <value>false</value>
              </property>
              <property>
                <name>fp_auth</name>
                <value>false</value>
              </property>
              <property>
                <name>fp_admin_login</name>
                <value>
              </value></property>
              <property>
                <name>fp_admin_password</name>
                <value>
              </value></property>
              <property>
                <name>ssl</name>
                <value>true</value>
              </property>
              <property>
                <name>shell</name>
                <value>/bin/bash</value>
              </property>
              <property>
                <name>php</name>
                <value>true</value>
              </property>
              <property>
                <name>php_handler_id</name>
                <value>fastcgi</value>
              </property>
              <property>
                <name>ssi</name>
                <value>false</value>
              </property>
              <property>
                <name>cgi</name>
                <value>true</value>
              </property>
              <property>
                <name>perl</name>
                <value>true</value>
              </property>
              <property>
                <name>python</name>
                <value>true</value>
              </property>
              <property>
                <name>asp</name>
                <value>false</value>
              </property>
              <property>
                <name>asp_dot_net</name>
                <value>false</value>
              </property>
              <property>
                <name>miva</name>
                <value>false</value>
              </property>
              <property>
                <name>coldfusion</name>
                <value>false</value>
              </property>
              <property>
                <name>webstat</name>
                <value>awstats</value>
              </property>
              <property>
                <name>webstat_protected</name>
                <value>true</value>
              </property>
              <property>
                <name>errdocs</name>
                <value>false</value>
              </property>
              <property>
                <name>wuscripts</name>
                <value>false</value>
              </property>
              <property>
                <name>at_domains</name>
                <value>false</value>
              </property>
              <property>
                <name>fastcgi</name>
                <value>true</value>
              </property>
              <property>
                <name>cgi_mode</name>
                <value>www-root</value>
              </property>
              <property>
                <name>www_root</name>
                <value>/yamato.xxx.com/httpdocs</value>
              </property>
              <property>
                <name>open_basedir</name>
                <value>{WEBSPACEROOT}{/}{:}{TMP}{/}</value>
              </property>
              <property>
                <name>nginx-transparent-mode</name>
                <value>false</value>
              </property>
              <property>
                <name>nginx-serve-static</name>
                <value>false</value>
              </property>
            </vrt_hst>
          </hosting>    </add>
  </site>
</packet>
[2015-01-09 05:21:07] DEBUG [api-rpc] Incoming API-RPC request [5839a438e99df6e042cd0613b646a56b]:
...
[2015-01-09 05:21:17] DEBUG [api-rpc] API-RPC response [5839a438e99df6e042cd0613b646a56b]:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.6.0">
  <site>
    <add>
      <result>
        <status>ok</status>
        <id>65</id>
        <guid>0a1a16d5-b584-45ae-9891-05d86873301e</guid>
      </result>
    </add>
  </site>
</packet>

[2015-01-09 05:21:17] DEBUG [panel] finish()
[2015-01-09 05:21:19] DEBUG [util_exec] [54af573fb93ee] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'monblogtest2015-4.fr' '--without-reverse'
[2015-01-09 05:21:19] DEBUG [util_exec] [54af573fb93ee] Finished in 0.01476s, Result: TRUE
[2015-01-09 05:21:19] DEBUG [util_exec] [54af573fbcf5f] Starting: dnsmng /opt/psa/admin/bin/dnsmng '--update' 'monblogtest2015-4.fr'
[2015-01-09 05:21:19] DEBUG [util_exec] [54af573fbcf5f] Finished in 0.04782s, Result: TRUE
[2015-01-09 05:21:19] DEBUG [util_exec] [5b410ea1bd625b124f0bfc7ab73f3092][0] Starting: glmng --enable-greylisting
[2015-01-09 05:21:19] DEBUG [util_exec] [5b410ea1bd625b124f0bfc7ab73f3092][0] Finished in 0.00596s, Error code: 0
[2015-01-09 05:21:19] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][0] Starting: apache-config -w /var/www/vhosts/system/monblogtest2015-4.fr/conf/httpd.conf
[2015-01-09 05:21:19] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][0] Finished in 0.01188s, Error code: 0
[2015-01-09 05:21:19] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][1] Starting: apache-config -l /var/www/vhosts/system/monblogtest2015-4.fr/conf/httpd.conf:/etc/apache2/plesk.conf.d/vhosts/monblogtest2015-4.fr.conf
[2015-01-09 05:21:20] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][1] Finished in 0.012s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][2] Starting: apache-config -w /etc/apache2/conf.d/zz010_psa_httpd.conf
[2015-01-09 05:21:20] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][2] Finished in 0.01188s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][3] Starting: apache-config -t
[2015-01-09 05:21:20] DEBUG [util_exec] [a355361df89a43a565ff76a74eccafd3][3] Finished in 0.08864s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [58e816e266bf3476e52780a5a75e1e45][0] Starting: apache_control_adapter --restart --restart-interval 30 --http-port 7080 --https-port 7081 --graceful

The packet result status is Ok so at this level everything is ok.
if I look the new domain is created, everything is ok at panel's level.
 
Just after that, we have some apache logs :
Code:
==> /var/log/apache2/error.log <==
[Fri Jan 09 05:21:20 2015] [notice] Graceful restart requested, doing restart
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24820): Destroying interpreters.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24820): Cleanup interpreter ''.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24818): Destroying interpreters.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24822): Destroying interpreters.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24822): Cleanup interpreter ''.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24818): Cleanup interpreter ''.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=25174): Destroying interpreters.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=25174): Cleanup interpreter ''.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=25174): Terminating Python.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24822): Terminating Python.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24818): Terminating Python.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24820): Terminating Python.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24819): Destroying interpreters.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24819): Cleanup interpreter ''.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=25174): Python has shutdown.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24822): Python has shutdown.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24818): Python has shutdown.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24820): Python has shutdown.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24819): Terminating Python.
[Fri Jan 09 05:21:20 2015] [info] mod_wsgi (pid=24819): Python has shutdown.

For me no error at this apache level also.

Then again some panel log :
Code:
==> /var/log/plesk/panel.log <==
[2015-01-09 05:21:20] DEBUG [util_exec] [58e816e266bf3476e52780a5a75e1e45][0] Finished in 0.28676s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][0] Starting: nginx-config -w /var/www/vhosts/system/monblogtest2015-4.fr/conf/nginx.conf
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][0] Finished in 0.01257s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][1] Starting: nginx-config -l /var/www/vhosts/system/monblogtest2015-4.fr/conf/nginx.conf:/etc/nginx/plesk.conf.d/vhosts/monblogtest2015-4.fr.conf
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][1] Finished in 0.01267s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][2] Starting: nginx-config -w /etc/nginx/conf.d/zz010_psa_nginx.conf
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][2] Finished in 0.01256s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][3] Starting: nginx-config -t
[2015-01-09 05:21:20] DEBUG [util_exec] [85cc021b24e7ac1a54a661ad7ac42c75][3] Finished in 0.03014s, Error code: 0
[2015-01-09 05:21:20] DEBUG [util_exec] [245bb92c424a60a639f6e12f49d227da][0] Starting: nginx_control --reload
[2015-01-09 05:21:20] DEBUG [util_exec] [245bb92c424a60a639f6e12f49d227da][0] Finished in 0.03195s, Error code: 0

No error here.

Then some nginx log without error.
Code:
==> /var/log/nginx/error.log <==
2015/01/09 05:21:20 [notice] 2923#0: using the "epoll" event method
2015/01/09 05:21:20 [notice] 2923#0: start worker processes
2015/01/09 05:21:20 [notice] 2923#0: start worker process 25661

And then is coming the interesting nginx log and apache error :
Code:
==> /var/log/nginx/error.log <==
2015/01/09 05:21:20 [notice] 2923#0: using the "epoll" event method
2015/01/09 05:21:20 [notice] 2923#0: start worker processes
2015/01/09 05:21:20 [notice] 2923#0: start worker process 25661

==> /var/www/vhosts/system/yamato.xxx.com/logs/error_log <==
[Fri Jan 09 05:21:23 2015] [emerg] [client 106.208.103.57] (22)Invalid argument: mod_fcgid: can't lock process table in pid 24821, referer: http://yamato.xxx.com/user/my_blogs

==> /var/log/apache2/error.log <==
[Fri Jan 09 05:21:23 2015] [info] mod_fcgid: process /var/www/cgi-bin/cgi_wrapper/cgi_wrapper(25225) exit(shutting down), terminated by calling exit(), return code: 0
[Fri Jan 09 05:21:23 2015] [info] mod_fcgid: Process manager 24815 stopped
[Fri Jan 09 05:21:23 2015] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 09 05:21:23 2015] [notice] Digest: done
[Fri Jan 09 05:21:23 2015] [info] mod_fcgid: Process manager 25662 started
[Fri Jan 09 05:21:23 2015] [info] Init: Seeding PRNG with 656 bytes of entropy

So for me the problem comes from mod_fcgid (maybe libapache2-mod-fcgid-psa ?) but I don't find anything talking about that on google.

Do you think I can find more debug log ?
 
Last edited:
I get also other logs from the domain proxy :
Code:
==> /var/log/apache2/error.log <==
[Fri Jan 09 06:02:47 2015] [notice] Graceful restart requested, doing restart
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25666): Destroying interpreters.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25666): Cleanup interpreter ''.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25668): Destroying interpreters.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25664): Destroying interpreters.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25665): Destroying interpreters.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25664): Cleanup interpreter ''.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25668): Cleanup interpreter ''.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25665): Cleanup interpreter ''.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=26110): Destroying interpreters.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=26110): Cleanup interpreter ''.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25665): Terminating Python.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25666): Terminating Python.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25664): Terminating Python.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25668): Terminating Python.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=26110): Terminating Python.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25668): Python has shutdown.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25664): Python has shutdown.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25665): Python has shutdown.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=25666): Python has shutdown.
[Fri Jan 09 06:02:47 2015] [info] mod_wsgi (pid=26110): Python has shutdown.

==> /var/log/plesk/panel.log <==
[2015-01-09 06:02:47] DEBUG [util_exec] [9a2105530c0d1c00f5756f36f7554ffc][0] Finished in 0.33243s, Error code: 0
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][0] Starting: nginx-config -w /var/www/vhosts/system/monblogtest2015-6.fr/conf/nginx.conf
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][0] Finished in 0.01235s, Error code: 0
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][1] Starting: nginx-config -l /var/www/vhosts/system/monblogtest2015-6.fr/conf/nginx.conf:/etc/nginx/plesk.conf.d/vhosts/monblogtest2015-6.fr.conf
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][1] Finished in 0.01248s, Error code: 0
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][2] Starting: nginx-config -w /etc/nginx/conf.d/zz010_psa_nginx.conf
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][2] Finished in 0.01236s, Error code: 0
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][3] Starting: nginx-config -t
[2015-01-09 06:02:48] DEBUG [util_exec] [3f34cbf27b4ea1a2652613fb4f8153d9][3] Finished in 0.03145s, Error code: 0
[2015-01-09 06:02:48] DEBUG [util_exec] [bc29b8b9561d06f326f181b7ff2eec1b][0] Starting: nginx_control --reload

==> /var/log/nginx/error.log <==
2015/01/09 06:02:48 [notice] 2923#0: signal 1 (SIGHUP) received, reconfiguring
2015/01/09 06:02:48 [notice] 2923#0: reconfiguring

==> /var/log/plesk/panel.log <==
[2015-01-09 06:02:48] DEBUG [util_exec] [bc29b8b9561d06f326f181b7ff2eec1b][0] Finished in 0.03331s, Error code: 0

==> /var/log/nginx/error.log <==
2015/01/09 06:02:48 [notice] 2923#0: using the "epoll" event method
2015/01/09 06:02:48 [notice] 2923#0: start worker processes
2015/01/09 06:02:48 [notice] 2923#0: start worker process 28010
2015/01/09 06:02:48 [notice] 25661#0: gracefully shutting down

==> /var/www/vhosts/system/yamato.xxx.com/logs/error_log <==
[Fri Jan 09 06:02:51 2015] [emerg] [client 106.208.103.57] (22)Invalid argument: mod_fcgid: can't lock process table in pid 25667, referer: http://yamato.xxx.com/user/my_blogs

==> /var/www/vhosts/system/yamato.xxx.com/logs/proxy_error_log <==
2015/01/09 06:02:51 [error] 25661#0: *27741 upstream prematurely closed connection while reading response header from upstream, client: 106.208.103.57, server: yamato.xxx.com, request: "POST /user/my_blogs HTTP/1.1", upstream: "http://37.187.161.189:7080/user/my_blogs", host: "yamato.xxx.com", referrer: "http://yamato.xxx.com/user/my_blogs"

==> /var/log/apache2/error.log <==
[Fri Jan 09 06:02:51 2015] [info] mod_fcgid: process /var/www/cgi-bin/cgi_wrapper/cgi_wrapper(27614) exit(shutting down), terminated by calling exit(), return code: 0
[Fri Jan 09 06:02:51 2015] [info] mod_fcgid: Process manager 25662 stopped
[Fri Jan 09 06:02:51 2015] [notice] Digest: generating secret for digest authentication ...
[Fri Jan 09 06:02:51 2015] [notice] Digest: done
[Fri Jan 09 06:02:51 2015] [info] mod_fcgid: Process manager 28011 started
[Fri Jan 09 06:02:51 2015] [info] Init: Seeding PRNG with 656 bytes of entropy

For me what is interesting is that part of these new logs, but I don't know what to do to solve, have you got an idea ?
Code:
==> /var/www/vhosts/system/yamato.xxx.com/logs/error_log <==

[Fri Jan 09 06:02:51 2015] [emerg] [client 106.208.103.57] (22)Invalid argument: mod_fcgid: can't lock process table in pid 25667, referer: http://yamato.xxx.com/user/my_blogs

==> /var/www/vhosts/system/yamato.xxx.com/logs/proxy_error_log <==

2015/01/09 06:02:51 [error] 25661#0: *27741 upstream prematurely closed connection while reading response header from upstream, client: 106.208.103.57, server: yamato.xxx.com, request: "POST /user/my_blogs HTTP/1.1", upstream: "http://37.187.161.189:7080/user/my_blogs", host: "yamato.xxx.com", referrer: "http://yamato.xxx.com/user/my_blogs"

==> /var/log/apache2/error.log <==

[Fri Jan 09 06:02:51 2015] [info] mod_fcgid: process /var/www/cgi-bin/cgi_wrapper/cgi_wrapper(27614) exit(shutting down), terminated by calling exit(), return code: 0
 
Hi Bourgois_Christophe,

The conclusion that it HAS to be a Plesk issue ( tipping on "libapache2-mod-fcgid-psa" ) is based on what, please? Your "errors" just show the normal behaviour during a restart of Apache, NGINX and FastCGI.

It is an absolute normal behaviour, that Apache, NGINX and FastCGI will be restarted, to finish the process of your api - request ( domain creation ). Actual connections will be closed and your logs show exactly the normal behaviour.

When creating a domain, there are several new configuration files, which will only work for the new domain, when some services are restarted, so Plesk will always initiate these restarts after a new domain creation. Calling the api-request from a domain hosted on the same server, will certainly result in a dead end, because of the restarts. The Plesk Control Panel itself doesn't restart, because it has it's own webserver. Consider using another way, to get a "success" reply for the new domain creation, if you call the api from the same server, where you want Plesk to create the new domain.
 
Dear UFHH01,
Many thanks for this very clear response !
I was thinking that Apache graceful restart was waiting for current processes (including mine) to be treated before to restart.
I'm not an expert that's why I made some maybe wrong suppositions, very sorry for that.
Thanks a lot for everything
Christophe Bourgois
 
Back
Top