[ZBXNEXT-5265]  Limit the number of fetched Actions per problem in problem view Created: 2019 May 31  Updated: 2019 Jun 21

Status: Need info
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 4.2.1, 4.2.2
Fix Version/s: None

Type: Change Request Priority: Minor
Reporter: Arnaud Ligot Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 1
Labels: crash, frontend
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

PHP 7.3


Attachments: PNG File memory profile.PNG    

 Description   

Conditions:**

We configured Zabbix to send all events to a custom php script dealing with all notifications. Thus there are a lots' of action linked to our problems.

Steps to reproduce:

  1. configure your account to display ~150 rows on the same page
  2. Navigate to problem.view

Result:

White page/error 500/out of memory

Analyze:
see memory profile.png - it seems CAlert::get is leading to very large memory consumption.

 

Workaround/solution:

within include/actions.inc.php, function getEventsAction, when calling API::Alert()->get(), I added a new options: 'time_from' => time()-86400 .

 

This limit the number of Action it fetch and make everyting working again.

 

The best solution would probably be to fetch max n actions of each event where n would be configurable somewhere.

 

Bottom line:

Thanks for all your great work!

 

 

 
 



 Comments   
Comment by Arturs Lontons [ 2019 Jun 04 ]

HI,
You could try increasing the allowed memory size within Apache. Other than that, this seems like more of a feature request than a bug report. Would you be okay with me changing the issue type to Feature request?

Regards, 
Arturs.

Comment by Arnaud Ligot [ 2019 Jun 04 ]

yes... I stopped once I reached 2Go ...

 

Anyway, the more ram I give, the more time it takes before the error... at 2Go, its about a minute...

 

Best regards,

 

a.
 

Comment by Arturs Lontons [ 2019 Jun 10 ]

Hi,
After discussing this internally, I think the best course of action would be to convert this issue into a feature request - since this cannot be classified as a bug per se, but more of a design flaw.

Generated at Tue Apr 23 13:54:47 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.