We had a Zabbix 4.4 server running for about a month. We decided to drop the DB and do a fresh install for Zabbix 5.0.1 server on AWS t3.small(2GB memory). It ran out of memory in a few days. I relaunched the server as t3.medium(4GB memory). It ran out of memory. Does anyone know why php-fpm is using so much memory?
The Zabbix server is CentOS 7. The database is external RDS mysql.
I created a phpinfo.php file. That seems to verify the memory_limit is 128M.
The Zabbix server is CentOS 7. The database is external RDS mysql.
Code:
[root@zabbixserver01 log]# rpm -qa | grep zabbix* zabbix-server-mysql-5.0.1-1.el7.x86_64 zabbix-get-5.0.1-1.el7.x86_64 zabbix-web-deps-scl-5.0.1-1.el7.noarch zabbix-apache-conf-scl-5.0.1-1.el7.noarch zabbix-web-5.0.1-1.el7.noarch zabbix-web-mysql-scl-5.0.1-1.el7.noarch zabbix-agent-5.0.1-1.el7.x86_64
Code:
[root@zabbixserver01 ~]# free -m
total used free shared buff/cache available
Mem: 3729 3207 150 159 371 114
Swap: 0 0 0
[root@zabbixserver01 ~]# systemctl restart rh-php72-php-fpm
[root@zabbixserver01 ~]# free -m
total used free shared buff/cache available
Mem: 3729 725 2623 159 381 2592
Swap: 0 0 0
Code:
[root@zabbixserver01 log]# more /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf [zabbix] user = apache group = apache listen = /var/opt/rh/rh-php72/run/php-fpm/zabbix.sock listen.acl_users = apache listen.allowed_clients = 127.0.0.1 pm = dynamic pm.max_children = 50 pm.start_servers = 5 pm.min_spare_servers = 5 pm.max_spare_servers = 35 php_value[session.save_handler] = files php_value[session.save_path] = /var/opt/rh/rh-php72/lib/php/session/ php_value[max_execution_time] = 300 php_value[memory_limit] = 128M php_value[post_max_size] = 16M php_value[upload_max_filesize] = 2M php_value[max_input_time] = 300 php_value[max_input_vars] = 10000 php_value[date.timezone] = America/New_York
Code:
<?php
phpinfo();
?>
Comment