[ZBX-25642] Javascript with multiple values and same item processed serially leading to OOM Created: 2024 Nov 29  Updated: 2025 Jan 07  Resolved: 2024 Dec 27

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 7.0.5, 7.2.1rc1, 7.4.0alpha1
Fix Version/s: 7.0.8rc1, 7.2.2rc1, 7.4.0alpha1

Type: Problem report Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File ZBX-25642-7.0.diff    
Issue Links:
Related
related to ZBX-25050 System uses virtual memory instead of... Sign off by Support
Team: Team B
Sprint: S24-W50/51/52/1
Story Points: 3

 Description   

In situations when there is single item receiving lots of values over short period and javascript preprocessing there is high memory usage in preprocessing manager because queue grows much faster than it can be processed due to javascript being executed in serial fashion.

Expected:
There is no reason to preprocess javascript serially, caching of compiled javascript in parallel can be implemented using locks (for simplicity it can be one common lock to access javascript cache because it is only used to store pointer, or lock per each preprocessing for best performance). When executing many javascripts in parallel then queue does not grow because it is processed faster then filled, thus memory usage stays low and data is preprocessed faster.

Steps:
Same as in ZBXNEXT-9622

Here is simple patch that disables caching of compiled javascript ZBX-25642-7.0.diff that can be tested to see if it resolves high memory usage



 Comments   
Comment by Vladislavs Sokurenko [ 2024 Dec 19 ]

Fixed in:

Generated at Tue Apr 01 11:41:34 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.