Child exited with code 70 after seconds from start
Abandon all hope, all ye who enter here.
[25-Jan-2021 16:41:20] WARNING: [pool php-fpm-12] child 1769115 exited with code 70 after 189840.994416 seconds from start [25-Jan-2021 16:41:20] NOTICE: [pool php-fpm-12] child 1935897 started [25-Jan-2021 16:41:22] WARNING: [pool php-fpm-12] child 1769114 exited with code 70 after 189847.829005 seconds from start [25-Jan-2021 16:41:22] NOTICE: [pool php-fpm-12] child 1935898 started [25-Jan-2021 16:41:23] WARNING: [pool php-fpm-12] child 1935897 exited with code 70 after 2.634514 seconds from start [25-Jan-2021 16:41:23] NOTICE: [pool php-fpm-12] child 1935900 started [25-Jan-2021 16:41:24] WARNING: [pool php-fpm-11] child 1932427 exited with code 70 after 4281.346069 seconds from start [25-Jan-2021 16:41:24] NOTICE: [pool php-fpm-11] child 1935901 started [25-Jan-2021 16:41:24] WARNING: [pool php-fpm-12] child 1935898 exited with code 70 after 2.636876 seconds from start [25-Jan-2021 16:41:24] NOTICE: [pool php-fpm-12] child 1935902 started [25-Jan-2021 16:41:29] WARNING: [pool php-fpm-14] child 1484761 exited with code 70 after 499615.087118 seconds from start [25-Jan-2021 16:41:29] NOTICE: [pool php-fpm-14] child 1935903 started
...
The Internet offers a handful of solutions you will find to specific causes for this exit code from php-fpm:
- PrivateDevices=true in fpm's systemd unit file, which blocks php from reading something in /dev it expects to.
- Server unable to allocate RAM for the request - this is not hitting php's memory_limit for your fpm child. You get a properly explained error when hitting memory_limit.
- When in doubt, downgrade. Or upgrade.
- If you have a situation like mine, where it is clear the parent process is bricking itself after hundreds of thousands to millions of total requests... you can just force-restart your php process daily.
So far these are the only two scenarios I've found that aren't extremely version specific. Neither of them helped me, of course, but I was curious what this error code actually meant.
Because finding someone with your specific problem is highly unlikely, I figured it might be helpful to provide an explanation for what code 70 is.
PHP-FPM Exit Status 70
php-fpm exit code 70 is FPM_EXIT_SOFTWARE.
This is the catch-all phrase for 'something went wrong with my code and I bricked myself'.
Some of these will provide errors, most of which point to issues with php itself rather than something you can fix... but hey, it's an answer. And maybe downgrading or upgrading might help.
But if you search the repo, you'll find
Some of these pathways lead to some information being given, but chances are just as likely you won't get anything. Your options here are to see if someone else has had the same problem (good luck), try some duct tape (downgrade, upgrade, create a reload or restart timer), or generate and debug core files.
In any case, I hope this helps people. Check the main page for the rest of the guide if you are interested, but it's mostly for Debian folks.