[ZBX-24711] Plain Text dashboards returning Unexpected server error when trying to edit on v7.0.0 Created: 2024 Jun 24  Updated: 2024 Aug 09  Resolved: 2024 Aug 09

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Kaloyan Hristov Assignee: Aigars Kadikis
Resolution: Cannot Reproduce Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: JPEG File 01-07-2024 12-21-19.jpg     PNG File Screenshot from 2024-06-24 10-25-56.png     PNG File image-2024-07-01-07-14-42-288.png     PNG File image-2024-07-01-07-15-36-938.png     PNG File image-2024-07-01-07-20-09-667.png     PNG File image-2024-07-01-09-17-50-714.png     PNG File image-2024-07-01-09-34-12-401.png     PNG File image-2024-07-01-09-34-48-648.png     PNG File image-2024-07-01-09-36-02-750.png     PNG File image-2024-07-01-16-00-43-420.png     PNG File image-2024-07-01-16-01-41-665.png    

 Description   

Steps to reproduce:
After upgrading Zabbix from v6.4.7 to v7.0.0, I cannot edit any of my past plain text dashboards (which should now be item history as per https://www.zabbix.com/documentation...n-text-widgets), I get directly Unexpected server error. I tried also recreating the dashboard but when I choose the item in Columns and click add, I get immediately the same error. Also checked the zabbix server logs but there's nothing there regarding this. Can you please advise if there's any way to fix this ?

 
Result:

See screenshot



 Comments   
Comment by Alexandre Mazovetski [ 2024 Jun 24 ]

Hi,

I have same issue.... and could not modify any widgets.

How solve it?

 

 

Comment by Bjarne [ 2024 Jun 25 ]

I have the same issue with dashboards after upgrading from 6.4.16 to 7.0.0

 

 

Comment by Rodrigo Alexandre Menegaldo [ 2024 Jun 28 ]

I have the same issue with dashboards after upgrading from Zabbix 6.4.2 to 7.0.0

LOG tail -f /var/log/apache2/error.log

After add widget in log apper this error below, but I raise limit memory in php the same error 

[Fri Jun 28 14:19:02.807390 2024] [php:error] [pid 3090622] [client xxx.xxx.xxx.xxx:62537] PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /usr/share/zabbix/include/classes/api/CRelationMap.php on line 72, referer: http://xxx.xxx.xxx.xxx/zabbix/zabbix.php?action=dashboard.view&dashboardid=172

Comment by Aigars Kadikis [ 2024 Jul 01 ]

rmenegaldo , the line in the log is known - the PHP is limited to 128 MB.

To fix the problem we can open /etc/zabbix/apache.conf (or /etc/php-fpm.d/zabbix.conf) and change:

php_value[memory_limit] = 128M

to:

php_value[memory_limit] = 2G

If cannot find the right file, this should give a good lead:

grep -r memory_limit /etc/* | grep zabbix

kaloyanhr could explore apache, nginx, php-fpm logs and see what the web server tells about "Unexpected server error"?

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

I've modified the file of PHP: /etc/php/8.1/apache2/php.ini  (increase php memory to 2 GB) but this error is same.

Ubuntu 22.04.3 LTS

Zabbix 7.0 (from Zabbix sources )

PHP 8.1 

Apache2 (latest version)

Comment by Rodrigo Alexandre Menegaldo [ 2024 Jul 01 ]

aigars.kadikis thank you for support
After chenge limit memory and restart apache now work fine


Comment by Aigars Kadikis [ 2024 Jul 01 ]

Thank you very much for taking the time to share feedback!

Comment by Aigars Kadikis [ 2024 Jul 01 ]

almaz101, it's not good practice to increase PHP memory globally.
Officially, we operate with overrides. Introduce a memory override just for Zabbix frontend layer (zabbix.conf, apache.conf)

To see the live value (recognized by the Zabbix GUI layer), we can visit the "setup.php" page and click the "Next" button once.

Comment by Rodrigo Alexandre Menegaldo [ 2024 Jul 01 ]

aigars.kadikis and almaz101 

See in the pre-requisites of zabbix is 128M, but no work fine when raise limit memory to 2G work! 

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

I did not found apache.conf or zabbix.conf.... command grep memory_limit doesn't find too.

Comment by Rodrigo Alexandre Menegaldo [ 2024 Jul 01 ]

Dears, another test I change Limit memory to 256M and work fine too

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

 

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

Also command grep memory_limit /etc/* doesnt show any result

 

Comment by Aigars Kadikis [ 2024 Jul 01 ]

almaz101, then increase the global PHP limit to 2048M. This is sufficient for most scenarios. Not less than this.

Comment by Alexandre Mazovetski [ 2024 Jul 01 ]

global PHP memory limit Increased to 2048 - same error.

Comment by Rodrigo Alexandre Menegaldo [ 2024 Jul 01 ]

almaz101 try restart service apache, PHP, zabbix or reboot your server and test again!

Comment by Bjarne [ 2024 Jul 02 ]

This didn't helped me. I still have the "Unexpected server error", when I edit a dashboard.

Comment by Kaloyan Hristov [ 2024 Jul 03 ]

Hello, aigars.kadikis ,

I was seeing the same error as Rodrigo mentioned in the nginx error log. After changing the PHP memory limit to 2G and restarting the php service it is now working correctly.

Thank you for your support.

Comment by Alexandre Mazovetski [ 2024 Jul 15 ]

I still have 'Unexpectedserver error".......  Modification of the Global settings of the PHP doesnt solve it.

Comment by Sieniu [ 2024 Jul 22 ]

I have the same problem. We can't add new widget or edit exist. I changed memory limit to 2G but it doesn't help me. Can we increase prioryty to higher ?

Comment by Sieniu [ 2024 Jul 25 ]

Only when I increased the parameter memory limit to 3G it started working, but the time to enter the gadget edition takes 90 sec

Comment by Aigars Kadikis [ 2024 Aug 09 ]

Increasing the PHP memory limit helps to solve the "Unexpected server error" message.

Generated at Sun Jun 15 14:15:13 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.