• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue PHP70-FPM ERROR: unable to read what child say: Bad file descriptor (9)

Hello,

Doesn't see any big problems here.
Did you plan to enable slow query log - to check what queries are running a lot of time
Thank you, I have enabled slow queries log but what about other recommendations? May be currently now required but for future what do you suggest?

I have restarted mariadb to enable slow queries.

Here is latest recommendations by mysqltuner

-------- Recommendations ---------------------------------------------------------------------------
General recommendations:
Control warning line(s) into /var/log/mariadb/mariadb.log file
Control error line(s) into /var/log/mariadb/mariadb.log file
Restrict Host for user@% to user@SpecificDNSorIp
MySQL started within last 24 hours - recommendations may be inaccurate
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries which have no LIMIT clause
Set thread_cache_size to 4 as a starting value
Increase table_open_cache gradually to avoid file descriptor limits
Read this before increasing table_open_cache over 64: table_cache negative scalability
Beware that open_files_limit (1024) variable
should be greater than table_open_cache (400)
Performance shouldn't be activated for MySQL and MariaDB 5.5 and lower version
Consider installing Sys schema from GitHub - mysql/mysql-sys: The MySQL sys schema
Variables to adjust:
query_cache_type (=0)
sort_buffer_size (> 2M)
read_rnd_buffer_size (> 256K)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
thread_cache_size (start at 4)
table_open_cache (> 400)
performance_schema = OFF disable PFS
innodb_file_per_table=ON
innodb_log_file_size * innodb_log_files_in_group should be equals to 1/4 of buffer pool size (=64M) if possible.
 
There are 20 minutes between the first an second two lines. This is o.k. and can be neglected. The bad file descriptor can have other reasons, too. It won't be possible to perfectly trace it down, there will always be some of these lines in the error log. It should not have any effect on the actual web content processing and delivery.

Here is latest error logs, Should I raise pm.max_children = 4000 more?

[13-Apr-2017 08:21:20] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:27:52] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:27:52] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:28:24] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:28:24] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:37:05] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:37:05] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:37:43] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:37:43] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:42:30] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 08:42:30] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:18:12] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:18:12] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:20:52] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:20:52] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:29:48] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:29:48] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:40:02] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:40:02] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:55:24] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 09:55:24] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:14:05] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:14:05] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:18:10] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:18:10] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:30:27] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:45:41] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:45:41] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:50:56] ERROR: unable to read what child say: Bad file descriptor (9)
[13-Apr-2017 10:50:56] ERROR: unable to read what child say: Bad file descriptor (9)
 
Can you identify an access_log or error_log entry for the times given in the PHP FPM error_log? The occasions might not have anything to do with the number of children. It could be caused by interrupted requests, too. For example timeouts of a script that does not respond properly or simply PHP errors (e.g. script is called, but delivers no output).
 
I have similar entries in my php log, all the time. I want to try to increase the max children size but I don't know where to do this: I have plenty of sites using the os vendor php - do I have to specify this value in every hosting or can I define this system wide?

In /etc/php/7.0/fpm/pool.d/ I have a www.conf and many other <host>.conf files that specifies the pm.max_children automatically.

Well, where can I change this? In Plesk itself or in any of these files?
 
The tip at the end to determine which domain is affected is not working. Maybe because every domain set on "PHP 7.0.13 by OS vendor" has its output to /var/log/php7.0-fpm.log in my installation. Do you know any way to get the affected hosts?
 
The tip at the end to determine which domain is affected is not working.
The path should probably be
/var/log/plesk-php*-fpm/error.log
for example
/var/log/plesk-php56-fpm/error.log
/var/log/plesk-php70-fpm/error.log
/var/log/plesk-php71-fpm/error.log
 
Back
Top