-
Problem report
-
Resolution: Unresolved
-
Major
-
None
-
Server, UI (nginx /1.20.1, php 8.2.25) and DB (PG16.6+TS 2.17.2) are all running in separate hosts, all with 2 CPU-s, 8G of memory.
-
Prev.Sprint, S25-W18/19
-
0.125
If a user (non-superadmin) tries to open mentioned page, it is unbearably slow. Playing around with permissions we have detected, that it relates greatly to template permissons. If user(group) has no access to any templates, opening that page can take ~30 seconds. Having permissions to templates, that are in use on hosts, that are displayed on initial hosts view, takes that time down to ~4-8 seconds and giving access to all possible template groups reduces it down to ~1 sec.
Steps to reproduce:
- Take fresh install of Zabbix
- Create 1 template group "Parent1" and set "Apply permissions to all subgroups"
- Create 1500 child groups Parent1
Parent1/Child1
Parent1/Child2
...
Parent1/Child1500 - Create 2 hostgroups "Parent1" and "Parent2" and set "Apply permissions to all subgroups"
- Create 1500 child groups in boths
Parent1
Parent1/Child1
Parent1/Child2
...
Parent1/Child1500
Parent2
Parent2/Child1
Parent2/Child2
...
Parent2/Child1500
- Create a usergroup UG1 (no permissions at this point)
- Create users user1 and user2 with admin role, place user1 to "UG1" and user2 to "zabbix adminitrators" group
- Modify "Zabbix administators" usergroup permissions and add "zabbix servers" under hostgroups. Otherwise it will not give any permissions to non superadmin users.
- Give UG1 access permissions - all templates and all hostgroups READ.
If you log in with user1 or user2, loading of Monitoring -> Hosts page should be just fine... maybe ~1sec at bad days... usually 4-500 ms - Log in as "Admin" and go and set "Apply permissions to all subgroups" again on that Parent1 Template group and both Parent1 and 2 hostgroups
- Go to UG1 settings and remove all permissions to templates and hosts. do not update, just add new row and add "zabbix servers" hostgroup with read permissions.
Result:
Log in with User1, observer loading times of Monitoring -> Hosts, 4.x sec+.
Just to verify, that it affects other users also, you can log in with user2, which has completely different permission set and it still loads that page slowly.
Even if UG1 gets deleted at this point, loading of page for user2 is still slow.
Expected:
No slow loading time.