• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Plesk 18.0.30 and apache graceful restart

EmilioO

Basic Pleskian
After upgrading to Plesk 18.0.30 in Ubuntu 16.04.7 LTS apache gracefully restart seems not working well.

In this morning apache has stopped 3 times, 502 bad gateway errors. I run: service apache restart and works again but about 30 minutes after apache goes down.

In apache logs at the time it's stop:

[mpm_prefork:notice] [pid 11915] AH00171: Graceful restart requested, doing restart

[Wed Sep 16 14:00:33.871226 2020] [:alert] [pid 11923] (4)Interrupted system call: FastCGI: read() from pipe failed (0)

[Wed Sep 16 14:00:33.871322 2020] [:alert] [pid 11923] (4)Interrupted system call: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye

[Wed Sep 16 14:00:34.190598 2020] [:notice] [pid 11915] mod_bw : Memory Allocated 0 bytes (each conf takes 48 bytes)

[Wed Sep 16 14:00:34.190623 2020] [:notice] [pid 11915] mod_bw : Version 0.92 - Initialized [0 Confs]

[Wed Sep 16 14:00:35.208190 2020] [fcgid:emerg] [pid 11915] (9)Bad file descriptor: mod_fcgid: Can't lock process table for initialization

[Wed Sep 16 14:00:35.208353 2020] [:notice] [pid 23246] FastCGI: process manager initialized (pid 23246)

[Wed Sep 16 14:00:35.210659 2020] [:alert] [pid 23246] FastCGI: read() from pipe failed (0)

[Wed Sep 16 14:00:35.210686 2020] [:alert] [pid 23246] FastCGI: the PM is shutting down, Apache seems to have disappeared - bye


I've run Plesk repair web without change.

Temporal I've disabled apache graceful restart.
 
update: with apache gracefull restart disabled problem persists.
if I set apache restart interval to 60 seconds. Apache stops after this time.
Only one entry en error.log: [mpm_prefork:notice] [pid 5223] AH00169: caught SIGTERM, shutting down
 
Last edited:
restarting entire server solves the problem
Problem persists I've receive this error:

Code:
Unable to generate the web server configuration file on the host <kinetica.mobi> because of the following errors:
Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 122
code: 0

Searching in logs:

Code:
[Thu Sep 17 11:29:16.160073 2020] [mpm_prefork:notice] [pid 27842] AH00169: caught SIGTERM, shutting down

Sep 17 11:29:17 kinetica apache2[28389]:  *
Sep 17 11:29:17 kinetica systemd[1]: Stopped LSB: Apache2 web server.

sep 17 11:29:17 kinetica.mobi apache2[28389]:  *
sep 17 11:29:17 kinetica.mobi systemd[1]: Stopped LSB: Apache2 web server.
sep 17 11:29:17 kinetica.mobi audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=apache2 comm="systemd" exe="/lib/systemd/systemd" hostname=? addr=? terminal=? res=success



 Details: [2020-09-17 12:36:40.687] ERR [util_exec] proc_close()
      failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart'
      '--restart-interval' '1800' '--http-port' '7080' '--https-port'
      '7081'] with exit code [255]
      [2020-09-17 12:37:04.029] ERR [panel] Apache config
      (16003388100.98830100) generation failed: Template_Exception:
      Can not restart web server:
      file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
      line: 122
      code: 0
      Can not restart web server:


● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf, limit_nofile.conf
   Active: inactive (dead) since jue 2020-09-17 12:34:38 CEST; 4min 33s ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/apache2.service
           ├─ 7145 /usr/sbin/apache2 -k start
           ├─17513 /usr/sbin/apache2 -k start
           └─27098 /usr/sbin/apache2 -k start
 
Last edited:
I've got the same problem here. I'm sitting on Debian 9 and this issue appears after updating to Plesk 18.0.30.
What I also noticed is that right before a apache crash the swap space is reaching limits. I get the same error when trying to use plesk repair:

Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 122
code: 0
 
Same here. Ubuntu 16.04 LTS, and with the recent update to 18.0.30 I get constant apache errors. This is with apache graceful restart DISABLED.

Unable to generate the web server configuration file on the host <ws.ba***.com> because of the following errors:
Template_Exception: Can not restart web server:

file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php

line: 122

code: 0

Please resolve the errors in web server configuration templates and generate the file again.
 
Last edited:
Same issue for me, when trying to fix the installation using "plesk installer update --repatch" and "plesk repair installation" I get the same error when it tries to fix the web configurations.

Ubuntu 16.04LTS, Plesk 18.0.30

Code:
Details: [2020-09-20 00:11:49.060] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255]
[2020-09-20 00:11:50.512] ERR [panel] Apache config (16005533770.74415300) generation failed: Template_Exception: Can not restart web server:
file: /opt/psa/admin/plib/Service/Driver/Web/Server/Apache.php
line: 122
code: 0
[2020-09-20 00:13:59.968] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/apache_control_adapter' '--restart' '--restart-interval' '0' '--http-port' '7080' '--https-port' '7081'] with exit code [255]
Can not restart web server:
 
Last edited:

I am not allowed to post there.. I guess we all are "new pleskians" so we all can't. The issue seems quite real though.
 
Thank you for the provided information. Those affected may try to workaround the issue by executing as root:

Bash:
sed -i -e 's|^\(apache_status_linux_debian\)|_\1|g' /opt/psa/admin/sbin/pleskrc
 
Back
Top