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

  1. Aug 21 10:47:28.134817 [NOTICE] fpm_children_make(), line 352: child 20649 (pool default) started
  2. Aug 21 10:47:28.135757 [NOTICE] fpm_children_make(), line 352: child 20650 (pool default) started
  3. Aug 21 10:47:28.136035 [NOTICE] fpm_children_make(), line 352: child 20651 (pool default) started
  4. Aug 21 10:47:28.136971 [NOTICE] fpm_children_make(), line 352: child 20652 (pool default) started
  5. Aug 21 10:47:28.138028 [NOTICE] fpm_children_make(), line 352: child 20653 (pool default) started
  6. Aug 21 10:47:28.138058 [NOTICE] fpm_event_loop(), line 107: libevent: entering main loop
  7. 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)"
  8. 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)"
  9. 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)"
  10. 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)"
  11. 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)"
  12. 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)"
  13. 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)"
  14. 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)"
  15. 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)"
  16. 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)"
  17. 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)"
  18. 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)"
  19. 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)"
  20. 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)"
  21. 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)"
  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)"
  23. 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)"
  24. 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)"
  25. 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)"
  26. 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)"
  27. 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)"
  28. 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)"
  29. 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)"
  30. 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)"
  31. 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)"
  32. 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)"
  33. 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)"
  34. 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)"
  35. 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)"
  36. 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)"
  37. 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)"
  38. 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)"
  39. 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)"
  40. 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)"
  41. 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)"
  42. 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)"
  43. 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)"
  44. 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)"
  45. 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)"
  46. 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)"
  47. 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)"
  48. 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)"
  49. 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)"
  50. 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)"
  51. 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)"
  52. 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)"
  53. 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)"
  54. 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)"
  55. 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)"
  56. 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)"
  57. 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)"
  58. 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)"
  59. 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)"
  60. 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)"
  61. 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)"
  62. 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)"
  63. 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)"
  64. 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)"
  65. 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)"
  66. 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)"
  67. 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)"
  68. 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)"
  69. 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)"
  70. 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

  1. ulimit -Shn 51200

/opt/nginx/etc/nginx.conf

  1. worker_rlimit_nofile 51200;
  2. events
  3. {
  4.      use epoll;
  5.  
  6.      worker_connections 51200;
  7. }

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

  1. <value name="rlimit_files">51200</value>
  1. ulimit -n

1024

  1. cat /proc/sys/fs/file-max

765985

  1. cat /proc/sys/fs/file-nr

3060 0 765985

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

  1. * soft nofile 51200
  2. * hard nofile 51200

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

2.
退出控制台重新登录

  1. 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.