Skip to content


linux ulimit max open files [WARNING] fpm_stdio_child_said(), line 167: child 29588 (pool default) said into stderr

tail -n70 /opt/php/logs/php-fpm.logs

Aug 21 10:47:28.134817 [NOTICE] fpm_children_make(), line 352: child 20649 (pool default) started
Aug 21 10:47:28.135757 [NOTICE] fpm_children_make(), line 352: child 20650 (pool default) started
Aug 21 10:47:28.136035 [NOTICE] fpm_children_make(), line 352: child 20651 (pool default) started
Aug 21 10:47:28.136971 [NOTICE] fpm_children_make(), line 352: child 20652 (pool default) started
Aug 21 10:47:28.138028 [NOTICE] fpm_children_make(), line 352: child 20653 (pool default) started
Aug 21 10:47:28.138058 [NOTICE] fpm_event_loop(), line 107: libevent: entering main loop
Aug 21 10:47:28.138119 [WARNING] fpm_stdio_child_said(), line 167: child 20653 (pool default) said into stderr: “Aug 21 10:47:28.137371 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138139 [WARNING] fpm_stdio_child_said(), line 167: child 20652 (pool default) said into stderr: “Aug 21 10:47:28.136442 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138151 [WARNING] fpm_stdio_child_said(), line 167: child 20651 (pool default) said into stderr: “Aug 21 10:47:28.136243 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138161 [WARNING] fpm_stdio_child_said(), line 167: child 20650 (pool default) said into stderr: “Aug 21 10:47:28.135276 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138171 [WARNING] fpm_stdio_child_said(), line 167: child 20649 (pool default) said into stderr: “Aug 21 10:47:28.134357 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138181 [WARNING] fpm_stdio_child_said(), line 167: child 20648 (pool default) said into stderr: “Aug 21 10:47:28.133984 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138193 [WARNING] fpm_stdio_child_said(), line 167: child 20647 (pool default) said into stderr: “Aug 21 10:47:28.132846 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138203 [WARNING] fpm_stdio_child_said(), line 167: child 20646 (pool default) said into stderr: “Aug 21 10:47:28.132496 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138213 [WARNING] fpm_stdio_child_said(), line 167: child 20645 (pool default) said into stderr: “Aug 21 10:47:28.126485 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138257 [WARNING] fpm_stdio_child_said(), line 167: child 20644 (pool default) said into stderr: “Aug 21 10:47:28.123230 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138270 [WARNING] fpm_stdio_child_said(), line 167: child 20643 (pool default) said into stderr: “Aug 21 10:47:28.116077 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138282 [WARNING] fpm_stdio_child_said(), line 167: child 20642 (pool default) said into stderr: “Aug 21 10:47:28.112005 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138292 [WARNING] fpm_stdio_child_said(), line 167: child 20641 (pool default) said into stderr: “Aug 21 10:47:28.114069 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138303 [WARNING] fpm_stdio_child_said(), line 167: child 20640 (pool default) said into stderr: “Aug 21 10:47:28.109341 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138314 [WARNING] fpm_stdio_child_said(), line 167: child 20639 (pool default) said into stderr: “Aug 21 10:47:28.109003 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138325 [WARNING] fpm_stdio_child_said(), line 167: child 20638 (pool default) said into stderr: “Aug 21 10:47:28.108659 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138334 [WARNING] fpm_stdio_child_said(), line 167: child 20637 (pool default) said into stderr: “Aug 21 10:47:28.107447 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138344 [WARNING] fpm_stdio_child_said(), line 167: child 20636 (pool default) said into stderr: “Aug 21 10:47:28.105309 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138354 [WARNING] fpm_stdio_child_said(), line 167: child 20635 (pool default) said into stderr: “Aug 21 10:47:28.104641 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138364 [WARNING] fpm_stdio_child_said(), line 167: child 20634 (pool default) said into stderr: “Aug 21 10:47:28.103690 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138375 [WARNING] fpm_stdio_child_said(), line 167: child 20633 (pool default) said into stderr: “Aug 21 10:47:28.101346 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138386 [WARNING] fpm_stdio_child_said(), line 167: child 20632 (pool default) said into stderr: “Aug 21 10:47:28.100429 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138396 [WARNING] fpm_stdio_child_said(), line 167: child 20631 (pool default) said into stderr: “Aug 21 10:47:28.098602 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138407 [WARNING] fpm_stdio_child_said(), line 167: child 20630 (pool default) said into stderr: “Aug 21 10:47:28.096524 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138418 [WARNING] fpm_stdio_child_said(), line 167: child 20629 (pool default) said into stderr: “Aug 21 10:47:28.094494 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138428 [WARNING] fpm_stdio_child_said(), line 167: child 20628 (pool default) said into stderr: “Aug 21 10:47:28.093321 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138446 [WARNING] fpm_stdio_child_said(), line 167: child 20627 (pool default) said into stderr: “Aug 21 10:47:28.092317 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138457 [WARNING] fpm_stdio_child_said(), line 167: child 20626 (pool default) said into stderr: “Aug 21 10:47:28.091560 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138467 [WARNING] fpm_stdio_child_said(), line 167: child 20625 (pool default) said into stderr: “Aug 21 10:47:28.088570 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138476 [WARNING] fpm_stdio_child_said(), line 167: child 20624 (pool default) said into stderr: “Aug 21 10:47:28.084022 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138486 [WARNING] fpm_stdio_child_said(), line 167: child 20623 (pool default) said into stderr: “Aug 21 10:47:28.081269 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138495 [WARNING] fpm_stdio_child_said(), line 167: child 20622 (pool default) said into stderr: “Aug 21 10:47:28.080984 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138505 [WARNING] fpm_stdio_child_said(), line 167: child 20621 (pool default) said into stderr: “Aug 21 10:47:28.076449 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138514 [WARNING] fpm_stdio_child_said(), line 167: child 20620 (pool default) said into stderr: “Aug 21 10:47:28.077009 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138523 [WARNING] fpm_stdio_child_said(), line 167: child 20619 (pool default) said into stderr: “Aug 21 10:47:28.069281 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138533 [WARNING] fpm_stdio_child_said(), line 167: child 20618 (pool default) said into stderr: “Aug 21 10:47:28.068479 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138542 [WARNING] fpm_stdio_child_said(), line 167: child 20617 (pool default) said into stderr: “Aug 21 10:47:28.066524 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138552 [WARNING] fpm_stdio_child_said(), line 167: child 20616 (pool default) said into stderr: “Aug 21 10:47:28.065905 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138562 [WARNING] fpm_stdio_child_said(), line 167: child 20615 (pool default) said into stderr: “Aug 21 10:47:28.065567 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138571 [WARNING] fpm_stdio_child_said(), line 167: child 20614 (pool default) said into stderr: “Aug 21 10:47:28.062630 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138583 [WARNING] fpm_stdio_child_said(), line 167: child 20613 (pool default) said into stderr: “Aug 21 10:47:28.059793 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138593 [WARNING] fpm_stdio_child_said(), line 167: child 20612 (pool default) said into stderr: “Aug 21 10:47:28.056453 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138604 [WARNING] fpm_stdio_child_said(), line 167: child 20611 (pool default) said into stderr: “Aug 21 10:47:28.053536 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138614 [WARNING] fpm_stdio_child_said(), line 167: child 20610 (pool default) said into stderr: “Aug 21 10:47:28.052367 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138632 [WARNING] fpm_stdio_child_said(), line 167: child 20609 (pool default) said into stderr: “Aug 21 10:47:28.051691 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138642 [WARNING] fpm_stdio_child_said(), line 167: child 20608 (pool default) said into stderr: “Aug 21 10:47:28.051512 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138653 [WARNING] fpm_stdio_child_said(), line 167: child 20607 (pool default) said into stderr: “Aug 21 10:47:28.048297 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138664 [WARNING] fpm_stdio_child_said(), line 167: child 20606 (pool default) said into stderr: “Aug 21 10:47:28.048226 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138674 [WARNING] fpm_stdio_child_said(), line 167: child 20605 (pool default) said into stderr: “Aug 21 10:47:28.047565 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138684 [WARNING] fpm_stdio_child_said(), line 167: child 20604 (pool default) said into stderr: “Aug 21 10:47:28.044563 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138694 [WARNING] fpm_stdio_child_said(), line 167: child 20603 (pool default) said into stderr: “Aug 21 10:47:28.042441 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138704 [WARNING] fpm_stdio_child_said(), line 167: child 20602 (pool default) said into stderr: “Aug 21 10:47:28.040655 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138714 [WARNING] fpm_stdio_child_said(), line 167: child 20601 (pool default) said into stderr: “Aug 21 10:47:28.030726 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138726 [WARNING] fpm_stdio_child_said(), line 167: child 20600 (pool default) said into stderr: “Aug 21 10:47:28.024933 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138736 [WARNING] fpm_stdio_child_said(), line 167: child 20599 (pool default) said into stderr: “Aug 21 10:47:28.021018 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138746 [WARNING] fpm_stdio_child_said(), line 167: child 20598 (pool default) said into stderr: “Aug 21 10:47:28.017561 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138757 [WARNING] fpm_stdio_child_said(), line 167: child 20597 (pool default) said into stderr: “Aug 21 10:47:28.016513 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138767 [WARNING] fpm_stdio_child_said(), line 167: child 20596 (pool default) said into stderr: “Aug 21 10:47:28.012491 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138778 [WARNING] fpm_stdio_child_said(), line 167: child 20595 (pool default) said into stderr: “Aug 21 10:47:28.011405 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138789 [WARNING] fpm_stdio_child_said(), line 167: child 20594 (pool default) said into stderr: “Aug 21 10:47:28.010464 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138799 [WARNING] fpm_stdio_child_said(), line 167: child 20593 (pool default) said into stderr: “Aug 21 10:47:28.008462 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138820 [WARNING] fpm_stdio_child_said(), line 167: child 20592 (pool default) said into stderr: “Aug 21 10:47:28.007855 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138832 [WARNING] fpm_stdio_child_said(), line 167: child 20591 (pool default) said into stderr: “Aug 21 10:47:28.007511 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”
Aug 21 10:47:28.138842 [WARNING] fpm_stdio_child_said(), line 167: child 20590 (pool default) said into stderr: “Aug 21 10:47:28.004508 [ERROR] fpm_unix_init_child(), line 168: setrlimit(RLIMIT_NOFILE) failed: Invalid argument (22)”

网上搜了下说是系统最大文件数和php-fpm.conf中rlimit_files不匹配的原因

一、我的配置
centos5.2 64bit
nginx0.7.61+php5.2.10+php-5.2.10-fpm-0.5.13

/etc/rc.local

ulimit -Shn 51200

/opt/nginx/etc/nginx.conf

worker_rlimit_nofile 51200;
events
{
use epoll;

worker_connections 51200;
}

/opt/php/etc/php-fpm.conf

51200


ulimit -n

1024


cat /proc/sys/fs/file-max

765985


cat /proc/sys/fs/file-nr

3060 0 765985

二、修改
1.
/etc/security/limits.conf
文件尾部增加

* soft nofile 51200
* hard nofile 51200

设置为星号代表全局
这个当中的硬限制是实际的限制,而软限制,是warnning限制,只会做出warning。

2.
退出控制台重新登录

ulimit -n

51200

3.
php-fpm reload不会生效,所以用 php-fpm restart

4.
检查一下
tail /opt/php/logs/php-fpm.log
ok,收工

Posted in PHP, 技术.

Tagged with .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.