For the past month or so, after moving our instance of confluence from one server to another, we've been running into a sporadic problem in which a specific query that seems to automatically run against a confluence table in the Confluence SQL database seems to lock up all of the databases on our server.
The query in question is "(@P0 datetime) DELETE FROM scheduler_run_details WHERE start_time < @P0"
Looking at the sys.dm_exec_query_memory_grants table shows that this query is not being allocated memory and, once this happens, subesquent queries to unrelated tables are also not granted memory. The only way we've been able to resolve this problem, once it occurs, is to restart the server.
After a restart, everything will run just fine for a week or so, and then the problem will pop up again.
We do not know what is causing this query to run or why it is not being allocated memory in SQL. Any information on how to resolve this problem would be greatly appreciated. Please let me know what other details are need and thanks for your help in advance!