Of late, the cpu usage on the db server is consistently at 100%. Even at 2 in the night when there is almost no traffic on the website and the load is negligible.
While trying to find the root cause, I see a lot of waiting tasks with wait type resource_semaphore_query_compile? All of these have started appearing lately in sys.dm_os_waiting_tasks
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x006E9E28 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x006E8F28 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x006E94C8 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x008DC988 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x008DD798 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x006E9C48 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x594364D8 NULL NULL resourceWait
0x006E9978 97 0 0 RESOURCE_SEMAPHORE_QUERY_COMPILE 0x027AAAC0 0x006E8C58 NULL NULL resourceWait
Why is this happening all of a sudden when nothing has changed? Also, the server 'self healed' itself yesterday, but the problem is back today? How to debug and fix this