Introduction
The Apache error "child process exited with score 3221225477" indicates a segmentation fault (access violation). The decimal number 3221225477 is the unsigned representation of the Windows NTSTATUS code 0xC0000005, which means ACCESS_VIOLATION. On Linux, the equivalent exit code 139 (signal 11 - SIGSEGV) indicates the same problem. This is a serious issue that causes Apache worker processes to crash and respawn:
[Mon Apr 08 23:00:00.123456 2026] [mpm_winnt:notice] [pid 1234] AH00363: Child process exited with score 3221225477Symptoms
- Apache error log shows child process exits with score 3221225477
- Worker processes crash and respawn repeatedly
- Intermittent 500 Internal Server Error responses to clients
- Server performance degrades as processes constantly restart
- The crash is triggered by specific requests or URL patterns
Common Causes
- Incompatible or buggy Apache module (especially third-party modules like mod_security, mod_pagespeed)
- PHP extension memory corruption (e.g., outdated Xdebug, incompatible OPCache settings)
- DLL version mismatch on Windows (e.g., OpenSSL libraries mismatching Apache version)
- Insufficient stack or memory for the worker process
- File system issues (corrupted .htaccess, unreadable files causing module crashes)
Step-by-Step Fix
- 1.Identify the crashing module by disabling modules one at a time. First, list loaded modules:
- 2.```bash
- 3.apachectl -M | sort
- 4.
` - 5.Then comment out recently added or third-party modules in the Apache configuration:
- 6.```apache
- 7.# LoadModule security2_module modules/mod_security2.so
- 8.# LoadModule pagespeed_module modules/mod_pagespeed.so
- 9.
` - 10.Check for PHP-related crashes. If the crash correlates with PHP requests, test with a simple PHP file:
- 11.```php
- 12.<?php phpinfo(); ?>
- 13.
` - 14.If this crashes PHP, the issue is in a PHP extension. Disable extensions in
php.ini: - 15.```ini
- 16.;zend_extension = xdebug.so
- 17.;extension = apcu.so
- 18.
` - 19.On Windows, verify DLL compatibility. Ensure all DLLs in the Apache
bindirectory match the Apache version and architecture (32-bit vs 64-bit): - 20.```cmd
- 21.apache -V
- 22.
` - 23.Check that
libssl.dll,libcrypto.dll, and other dependencies are the correct versions. - 24.Increase MaxConnectionsPerChild to limit how long a process runs before recycling:
- 25.```apache
- 26.MaxConnectionsPerChild 5000
- 27.
` - 28.This prevents long-running processes from accumulating memory corruption.
- 29.Enable core dumps for detailed crash analysis on Linux:
- 30.```bash
- 31.sudo sysctl -w kernel.core_pattern=/tmp/core.%e.%p
- 32.ulimit -c unlimited
- 33.
` - 34.After a crash, analyze the core dump:
- 35.```bash
- 36.gdb /usr/sbin/apache2 /tmp/core.apache2.1234
- 37.(gdb) bt
- 38.
` - 39.The backtrace shows exactly which function and module caused the crash.
- 40.Update Apache and all modules to the latest stable versions:
- 41.```bash
- 42.sudo apt update && sudo apt upgrade apache2 libapache2-mod-php
- 43.
` - 44.Many segfault bugs are fixed in minor releases.
Prevention
- Keep Apache and all modules updated with security patches
- Test module upgrades in a staging environment before production deployment
- Set
MaxConnectionsPerChildto a reasonable value (3000-10000) to periodically recycle processes - Monitor Apache error logs for the first occurrence of the crash pattern
- Use
apache2 -t -D DUMP_MODULESto document all loaded modules for each server - Avoid mixing modules from different Apache versions or repositories