AH00169: caught SIGTERM, shutting down

September 18, 2019 2.7k views
Linux Basics Apache WordPress LAMP Stack

Anyone encountered the same issue like this?

Apache will just restart after several minute or idle time.

Here’s the logs.

[Wed Sep 18 08:40:31.204318 2019] [core:notice] [pid 3704] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 18 08:43:12.823934 2019] [mpm_prefork:notice] [pid 3704] AH00171: Graceful restart requested, doing restart
[Wed Sep 18 08:43:12.940468 2019] [mpm_prefork:notice] [pid 3704] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1c configured -- resuming normal operations
[Wed Sep 18 08:43:12.940499 2019] [core:notice] [pid 3704] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 18 08:43:22.975687 2019] [mpm_prefork:notice] [pid 3704] AH00171: Graceful restart requested, doing restart
[Wed Sep 18 08:43:23.094698 2019] [mpm_prefork:notice] [pid 3704] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1c configured -- resuming normal operations
[Wed Sep 18 08:43:23.094739 2019] [core:notice] [pid 3704] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 18 08:43:43.479448 2019] [mpm_prefork:notice] [pid 3704] AH00169: caught SIGTERM, shutting down
[Wed Sep 18 08:43:43.677845 2019] [mpm_prefork:notice] [pid 5070] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1c configured -- resuming normal operations
[Wed Sep 18 08:43:43.677948 2019] [core:notice] [pid 5070] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 18 08:46:55.304779 2019] [mpm_prefork:notice] [pid 5070] AH00173: SIGHUP received.  Attempting to restart
[Wed Sep 18 08:46:55.358171 2019] [mpm_prefork:notice] [pid 5070] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1c configured -- resuming normal operations
[Wed Sep 18 08:46:55.358218 2019] [core:notice] [pid 5070] AH00094: Command line: '/usr/sbin/apache2'
5 Answers

Hello, @Menj

Can you please check the /var/log/messages for any killed processes? The apache process may be killed if it’s using a lot of resources. You can check this using the following command:

grep -i kill /var/log/messages

You can then check if there are any references for apache as well or you can modify the command to show those related with apache:

grep -i kill /var/log/messages | grep apache

Let me know how it goes.
Alex

Hi @alexdo

I am getting like this after running your commands

grep: /var/log/messages: No such file or directory

Please let me know how to solve this problem.

Hello, @akhileswar @Menj

Ubuntu no longer uses the /var/log/messages file by default. The same information is available in the file /var/log/syslog. You can re-enable logging to /var/log/messages if you would like.

You can use the following command:

grep -i kill /var/log/syslog | grep apache

Let me know how it goes.

Regards,
Alex

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!