Zabbix Website Do Not Open: HTTP 500 Error

If individual Zabbix pages do not open and instead show an HTTP 500 error, the most likely cause is that PHP has been assigned too little memory. In practice, this often happens when Zabbix tries to render a page that needs more resources than the current PHP memory_limit allows.

Error Analysis in nginx Logs

The fastest way to confirm the problem is to check the nginx error log for memory-related messages. The log file is usually located here:
/var/log/nginx/error.log

To watch the log in real time, use:
tail -f /var/log/nginx/error.log

If the issue is memory-related, you will typically find a message like this:
Allowed memory size of xxxxxx bytes exhausted

A real example may look like this:
2022/12/08 17:13:35 [error] 12315#12315: *355 FastCGI sent in stderr: "Passing INI directive through FastCGI: unable to set 'always_populate_raw_post_data'
PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/classes/api/CRelationMap.php on line 77
PHP message: PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/func.inc.php on line 1071" while reading response header from upstream, client: 172.18.7.147, server: zabbix.domain.de, request: "GET /zabbix.php?action=host.view HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "zabbix.domain.de", referrer: "https://zabbix.domain.de/overview.php"
The important part is the Allowed memory size ... exhausted message. That clearly shows that PHP ran out of memory while processing the request.

Fixing the PHP Memory Limit
To solve the issue, increase the PHP memory limit in the nginx site configuration file. In your case, the relevant file is:
/etc/nginx/sites-enabled/http.zabbix.domain.de.conf

Before changing anything, it is a good idea to create a backup of the file. Then open it with a text editor such as Nano and adjust the memory_limit value.

Example:
sudo nano /etc/nginx/sites-enabled/http.csizabbix.sk-ad.de.conf

Inside the configuration, change the line:
memory_limit = xxxM

to a higher value, for example:
memory_limit = 512M


Restarting the Services
After updating the configuration, restart both PHP-FPM and nginx so the new setting takes effect.
sudo systemctl restart php7.2-fpm.service
sudo systemctl restart nginx.service
sudo systemctl restart php7.2-fpm.service
sudo systemctl restart nginx.service

Once both services are restarted, the Zabbix pages should open again if the HTTP 500 error was caused by the memory limit.

Short Conclusion
An HTTP 500 error in Zabbix does not always mean a broken application. In many cases, the real issue is simply that PHP does not have enough memory to render the requested page. Checking the nginx error log is the best first step, and increasing the PHP memory_limit usually resolves the problem.

Zabbix Value Cache Running on Low Memory Mode

This warning usually appears together with the dashboard message:

More than 75% used in the configuration cache
Together, these messages indicate that the cache allocated for Zabbix events and configuration data is too small. In many cases, this is only a temporary situation. For example, a proxy may have been disconnected for a longer period and then starts sending a large number of queued events back to the central Zabbix server all at once.

In your case, the issue appeared after a Zabbix upgrade. Once the proxies reconnected, they delivered their stored events, and that created a temporary load spike that exceeded the available cache size.

What the message means
The value cache is used by Zabbix to store frequently accessed data in memory. If that cache becomes too small, Zabbix falls back into a low memory mode and starts warning that the cache is under pressure. This does not always mean the system is broken, but it is a clear sign that the current cache size is no longer sufficient for the workload.

In larger environments, this can happen after upgrades, after proxy reconnects, or during periods of unusually high event volume. If the cache remains too small for a longer time, performance can degrade and Zabbix may become slower when processing new events or queries.

How to fix it
The cache size must be adjusted in the Zabbix server configuration file on the Zabbix server. The configuration file is located in:
/etc/zabbix

Open the file zabbix_server.conf with a text editor such as Nano and search for the cachesize parameter.

Example:
sudo nano /etc/zabbix/zabbix_server.conf

You wil find a value that looks like:
### Option: CacheSize
CacheSize=4G

The current value in this case is set to 4GB. If the system keeps reporting cache pressure, this value should be increased to give Zabbix more room for events and configuration data.

After saving the file, restart the Zabbix server service so the new setting is loaded:
sudo systemctl restart zabbix-server

Why this happened
This kind of issue is often temporary and can be triggered by a sudden backlog of data. A proxy that was offline for some time may reconnect and forward many events at once. After a Zabbix update, the system may also briefly experience a higher load because proxies and the server need to catch up with pending data.

That is why cache-related messages are not always a sign of a permanent configuration problem. However, if they appear repeatedly, increasing the cache size is the correct long-term fix.

Short conclusion
The messages about low memory mode and configuration cache usage mean that the Zabbix server cache is under pressure. In your case, the most likely cause was the event backlog after the upgrade and proxy reconnects. Increasing the cachesize value in zabbix_server.conf and restarting the Zabbix server should resolve the issue.
“Das einzig sichere System müsste ausgeschaltet, in einem versiegelten und von Stahlbeton ummantelten Raum und von bewaffneten Schutztruppen umstellt sein.”
Gene Spafford (Sicherheitsexperte)