Removing the line in question yields the same result.
I enabled Glowroot as you suggested. I'm not very familiar with the Java ecosystem and these tools. From what I can see, there are many slow queries. I'm providing the export for a few long-running queries (/rest, /spaces, and a subwiki page). There might be a link to Hibernate and database access.