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:

bash
[Mon Apr 08 23:00:00.123456 2026] [mpm_winnt:notice] [pid 1234] AH00363: Child process exited with score 3221225477

Symptoms

  • 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. 1.Identify the crashing module by disabling modules one at a time. First, list loaded modules:
  2. 2.```bash
  3. 3.apachectl -M | sort
  4. 4.`
  5. 5.Then comment out recently added or third-party modules in the Apache configuration:
  6. 6.```apache
  7. 7.# LoadModule security2_module modules/mod_security2.so
  8. 8.# LoadModule pagespeed_module modules/mod_pagespeed.so
  9. 9.`
  10. 10.Check for PHP-related crashes. If the crash correlates with PHP requests, test with a simple PHP file:
  11. 11.```php
  12. 12.<?php phpinfo(); ?>
  13. 13.`
  14. 14.If this crashes PHP, the issue is in a PHP extension. Disable extensions in php.ini:
  15. 15.```ini
  16. 16.;zend_extension = xdebug.so
  17. 17.;extension = apcu.so
  18. 18.`
  19. 19.On Windows, verify DLL compatibility. Ensure all DLLs in the Apache bin directory match the Apache version and architecture (32-bit vs 64-bit):
  20. 20.```cmd
  21. 21.apache -V
  22. 22.`
  23. 23.Check that libssl.dll, libcrypto.dll, and other dependencies are the correct versions.
  24. 24.Increase MaxConnectionsPerChild to limit how long a process runs before recycling:
  25. 25.```apache
  26. 26.MaxConnectionsPerChild 5000
  27. 27.`
  28. 28.This prevents long-running processes from accumulating memory corruption.
  29. 29.Enable core dumps for detailed crash analysis on Linux:
  30. 30.```bash
  31. 31.sudo sysctl -w kernel.core_pattern=/tmp/core.%e.%p
  32. 32.ulimit -c unlimited
  33. 33.`
  34. 34.After a crash, analyze the core dump:
  35. 35.```bash
  36. 36.gdb /usr/sbin/apache2 /tmp/core.apache2.1234
  37. 37.(gdb) bt
  38. 38.`
  39. 39.The backtrace shows exactly which function and module caused the crash.
  40. 40.Update Apache and all modules to the latest stable versions:
  41. 41.```bash
  42. 42.sudo apt update && sudo apt upgrade apache2 libapache2-mod-php
  43. 43.`
  44. 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 MaxConnectionsPerChild to 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_MODULES to document all loaded modules for each server
  • Avoid mixing modules from different Apache versions or repositories