pm.max_requests for PHP-FPM packages

XMLWordPrintable

    • Type: Problem report
    • Resolution: Fixed
    • Priority: Trivial
    • None
    • Affects Version/s: 5.0.17
    • Component/s: Packages (C)
    • None
    • Environment:
      RHEL8
    • Sprint 81 (Oct 2021)
    • 0.5

      We've observed a growing number of RHEL8 users experiencing "out of memory" issues from "php-fpm"
      These issues have become more prevalent as the user base increases.

      A potential solution is to include the 'pm.max_requests' parameter in the package's default settings (zabbix.conf).
      'pm.max_requests' provides an avenue for re-spawning a thread or child and clearing the memory that has been used, thereby addressing these memory issues.

      Without this setting, php-fpm's dynamic process manager, which is responsible for handling PHP's FastCGI processes, doesn't effectively de-allocate used memory.
      This can lead to unexpected memory allocation behaviors and cause the system to use swap space excessively, as demonstrated by the increased swap usage by php-fpm pool 'zabbix' processes below:

      php-fpm: pool zabbix
      
      /proc/1165/status:VmSwap:         145956 kB
      /proc/1162/status:VmSwap:         137972 kB
      /proc/1161/status:VmSwap:         129540 kB
      /proc/1167/status:VmSwap:         127688 kB
      /proc/1166/status:VmSwap:         127660 kB
      

      → 'pm.max_requests' into the default configuration could help alleviate the "out of memory" problem

            Assignee:
            Jurijs Klopovskis
            Reporter:
            Kim Jongkwon
            Team B
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: