When loading the Space Directory page (especially when filtering by a space category) creates Long running DB sessions eventually impacting the instance performance

XMLWordPrintable

    • 2
    • Severity 3 - Minor
    • 41

      Issue Summary

      When loading the Space Directory page (especially when filtering by a space category), it creates long running DB sessions eventually impacting the instance performance.

      Steps to Reproduce

      1. Install Confluence version 9.2.19
      2. Load large spaces such that DB has a large dataset with millions of rows in CONTENT table
      3. Create spaces by Category eg. Team
      4. Enable SQL logging
      5. Now login as an admin or non admin user
      6. Visit the Space directory page

      Expected Results

      • The page loads quickly with no long running DB sessions or blocked threads observed

      Actual Results

      • Blocked DB sessions observed
      • We can see the below query being triggered in the SQL logs
      2026-05-13 11:27:44,870 DEBUG [http-nio-8090-exec-14 url: /confluence/spacedirectory/view.action; user: test] [org.hibernate.SQL] logStatement select distinct space1_.SPACEID as spaceid1_73_, space1_.SPACENAME as spacenam2_73_, space1_.SPACEKEY as spacekey3_73_, space1_.LOWERSPACEKEY as lowerspa4_73_, space1_.SPACEDESCID as spacedes5_73_, space1_.HOMEPAGE as homepage6_73_, space1_.CREATOR as creator7_73_, space1_.CREATIONDATE as creation8_73_, space1_.LASTMODIFIER as lastmodi9_73_, space1_.LASTMODDATE as lastmod10_73_, space1_.SPACETYPE as spacety11_73_, space1_.SPACESTATUS as spacest12_73_ from SPACEPERMISSIONS spacepermi0_ inner join SPACES space1_ on spacepermi0_.SPACEID=space1_.SPACEID where (spacepermi0_.PERMUSERNAME=? or spacepermi0_.PERMGROUPNAME in (?) or spacepermi0_.PERMALLUSERSSUBJECT='authenticated-users' or (spacepermi0_.PERMUSERNAME is null) and (spacepermi0_.PERMGROUPNAME is null) and (spacepermi0_.PERMALLUSERSSUBJECT is null)) and spacepermi0_.PERMTYPE=? and (space1_.SPACEDESCID in (select labelling2_.CONTENTID from CONTENT_LABEL labelling2_ cross join LABEL label3_ cross join CONTENT contentent4_ where labelling2_.CONTENTID=contentent4_.CONTENTID and labelling2_.LABELID=label3_.LABELID and (label3_.LABELID in (?)))) order by space1_.SPACENAME, space1_.SPACEKEY limit ?  
      | traceId: 774210e6d3f4c7c8 
        

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Assignee:
              Mahesh Swami
              Reporter:
              Shivangi Nayak
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: