Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26351

Opening of Monitoring -> Hosts page is slow

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • API (A), Frontend (F)
    • 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:

      1. Take fresh install of Zabbix
      2. Create 1 template group "Parent1" and set "Apply permissions to all subgroups"
      3. Create 1500 child groups Parent1
        Parent1/Child1
        Parent1/Child2
        ...
        Parent1/Child1500
      4. Create 2 hostgroups "Parent1" and "Parent2" and set "Apply permissions to all subgroups"
      5. Create 1500 child groups in boths
        Parent1
        Parent1/Child1
        Parent1/Child2
        ...
        Parent1/Child1500
        Parent2
        Parent2/Child1
        Parent2/Child2
        ...
        Parent2/Child1500
      1. Create a usergroup UG1 (no permissions at this point)
      2. Create users user1 and user2 with admin role, place user1 to "UG1" and user2 to "zabbix adminitrators" group
      3. Modify "Zabbix administators" usergroup permissions and add "zabbix servers" under hostgroups. Otherwise it will not give any permissions to non superadmin users.
      4. 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
      5. 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
      6. 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.

        1. 292055_debug_ER-17088.txt
          103 kB
        2. 292055_debug_ER-17088-1.txt
          103 kB
        3. 292056_debug2_ER-17088.txt
          103 kB
        4. 292056_debug2_ER-17088-1.txt
          103 kB
        5. Screenshot 2025-04-24 at 09.02.53.png
          Screenshot 2025-04-24 at 09.02.53.png
          19 kB
        6. zbx-26351-7.0.12.patch
          5 kB
        7. zbx-26351-debug.patch
          2 kB

            vmaksimovs Vladimirs Maksimovs
            bnems Bartosz Nems
            Team C
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: