Skip to content

ERROR: unable to read what child 15029 said into stderr: Bad file descriptor (9) #12559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
njaciklum opened this issue Oct 30, 2023 · 4 comments

Comments

@njaciklum
Copy link

Description

We recently upgraded our application, which is built using CodeIgniter 3, from PHP 8.0 to 8.2. However, we've been encountering persistent errors in our logs that didn't occur with PHP 8.0.

The error message is as follows:

ERROR: unable to read what child 15029 said into stderr: Bad file descriptor (9)
Screenshot 2023-10-30 at 12 18 45 PM

We have attempted to address this issue by modifying the following configuration values in our PHP-FPM configuration, but with no success:

  • pm.max_children = 100
  • pm.process_idle_timeout = 1800
  • pm.max_requests = 400
  • Increased max resources

We have tried increasing our ECS instance size with no luck.

Real-time PHP-FPM Status
Screenshot 2023-10-30 at 12 15 58 PM

Any help in this regard would be greatly appreciated

PHP Version

PHP 8.2.x

Operating System

Debian 12

@bukka
Copy link
Member

bukka commented Nov 3, 2023

My guess is that it's happening because child gets killed and pipe is closed on the child side so master gets this error which it logs. The pm.max_requests is very low which means that PHP will kill child after that amount of requests. This looks pretty similar to #11707 where the OP saw similar issue after the update too. I would recommend trying to significantly increase pm.max_requests first and see if it helps.

@njaciklum
Copy link
Author

Appreciate it, @bukka! Unlike blackwolf12333, we can confirm that configurations haven't been updated in years.

For now, we've set max_requests = 0 and are monitoring it closely. Will share any further updates as soon we have them.

@njaciklum
Copy link
Author

Thanks for referring to the post @bukka

Just an update, we haven't observed the issue since we updated the configurations

pm.max_children = 300
pm. start_servers = 50
pm. min_spare_servers = 30
pm. max_spare_servers = 50
pm. max_requests = 0

Continuing to monitor the logs for a few more days.

@njaciklum
Copy link
Author

After observing the logs for couple of weeks, no new log has been found related to this issue, closing this issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants