title: SQL Server process blocked by tempdb
body: <p>When I tried to perform a query in my SQL Server database it was taking too long. When I opened the resource monitor, I saw the RESOURCE_SEMAPHORE wait type and I saw that the query is being blocked by ProcessID 56. Process ID 56 in my case as you can see from the image below belongs to tempDB. Can someone please explain what could be going here? If I run the query from Nodejs server I get:</p>
  <pre><code>RequestError: Query timeout expired
  </code></pre>
  <p>I resolved the issue by killing process 56. Once I did that and refreshed the process monitor it showed block on some other process which I deleted as well which  resolved the issue. But this has happened a few times now and I just wanted to know what I can do to prevent situations like this in the future.</p>
  <p><a href="https://i.stack.imgur.com/HQo5R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HQo5R.png" alt="enter image description here" /></a></p>