r/SQLServer • • Aug 16 '26

Solved Temp Cache endlessly expanding until server failure/slowdown

I am working on a consultant's azure gov cloud portal where I put applications on. There is a consistent issue with queries running forever even after being finished executing. Do anyone have experience with this? The temp cache endlessly expands until our DB fails.

I believe the issue is the connector, but it may be the queries? I dont know.

Solved: it was the connector

7 Upvotes

30 comments sorted by

View all comments

Show parent comment

1

u/TheSmashingChamp Aug 16 '26

My applications are all Python based. Front end with react. I believe the issue is the connector. I have monitored tempeh usage when running the application locally and found no issues. The temp always clears on it own or doesn’t fill at all (less than 1 MB). On the azure platform a users sessions holds forever regardless of where they access a query. I am at a loss here

1

u/jwk6 Aug 17 '26

It has to be an issue with your backend Python code, or possibly a driver configuration problem.

Are you using Connection Pooling and not explicitly calling close() on each connection, or using With, to close and return the connections to the pool?

1

u/Lost_Term_8080 Aug 17 '26

I've seen the same thing in python apps with a default to implicit transactions without auto commit.