Search code examples
monitoringmonitorzabbixzabbix-apizabbix-custom-reports

Zabbix does not let me import a template of size 32MB and tells me I do not have permissions to access this page while I have access of super admin


I am trying to set up a Zabbix 6.4 server, web, and PostgreSQL using nginx by docker. At first, when I wanted to upload a template with a size of 30MB,zabbix web server did not allow me to upload it because it was too large. As a result, I changed the client_max_body_size to 1024M in nginx from /etc/zabbix/nginx.conf. However, now, that I have changed the max_size, Zabbix is telling me that I do not have permission to access this page which is a wrong message, because when I upload a smaller template of about 8MB it shows me the next page importing the template and at last, I import it successfully. I appreciate any help that show me how I can solve this problem or debug it.


Solution

  • I, finally, found the real problem by looking at the logs of Zabbix-web-server. The problem was with the PHP memory limit which was too small and, I had to change php_value[memory_limit] to 2048M in /etc/php81/php-fpm.d/zabbix.conf.

    Some solutions that helped me to find my answer: https://www.zabbix.com/forum/zabbix-help/35782-php-fatal-error-allowed-memory-size-of-134217728-bytes-exhausted-tried-to-allocate

    Zabbix and "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 78 bytes)"

    https://serverfault.com/questions/500143/nginx-php-fpm-how-to-specify-memory-limit-for-an-application