Why Apache crashes with SIGTERM and how to fix it

by | Oct 19, 2026 | Tutorials | 0 comments

Quick answer

A SIGTERM in the Apache log is not always a crash — it is often a clean shutdown triggered by something.

A SIGTERM in the Apache log is not always a crash — it is often a clean shutdown triggered by something. The trick is telling an intentional restart apart from an unexpected one.

What you need: Access to the Apache error log, dmesg, and the MPM configuration.

Read the shutdown context

Look at the lines just before the SIGTERM. “caught SIGTERM, shutting down” is normal on stop/restart. A missing parent or repeated child kills points elsewhere.

Check for OOM

If the server is low on memory, the kernel OOM killer sends SIGTERM to the biggest process, which is often Apache. Check dmesg for “Out of memory”.

Tune the process model

Reduce MaxRequestWorkers or move to event MPM with PHP-FPM so a single hungry request cannot take down the whole server.

dmesg -T | grep -i 'out of memory'
free -h
apachectl -M | grep mpm

How it works, in detail

A SIGTERM in Apache is normally a clean shutdown triggered by a stop or reload, not a crash. The difference shows up in the lines around it: a parent telling children to exit is normal, while repeated worker deaths or a missing parent point to a resource problem. On low-memory boxes the kernel OOM killer targets the largest process, which is frequently the web server, and the fix is to reduce workers rather than add more. Event MPM plus PHP-FPM keeps a single slow request from taking the whole pool down.

Common pitfalls

  • Assuming every SIGTERM is a crash and chasing a bug that is not there.
  • Raising MaxRequestWorkers to fix OOM, which makes memory pressure worse.

Pro tip

Correlate SIGTERM timestamps with free -h and dmesg output before changing any configuration.

Once you confirm the SIGTERM source, the fix is almost always sizing: give Apache fewer workers and let PHP-FPM absorb the traffic.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

avatart

About

I’m a System Administrator and a developer with 10+ years of experience.