79231888

Date: 2024-11-27 21:14:24
Score: 2
Natty:
Report link

Not that I think this will actually help... I think this more just demonstrates how generic the exception is, that so many 'solutions' are possible to fix one generic error message.

But, lessons learned for me: None of the troubleshooting and issues mentioned by commenters here helped me. GPT was no help. Well, sort of...it did mention my issue in passing. Temp Tables.

I have an edge case: I have an app that must build "payloads" of transactional data and pass them up through an MQTT broker. Queries must run every minute to build more payloads, and they must reach out to other databases for much of this through linked servers.

So, performance is a must. I can't have a very costly join to large production tables hinder me. So, I designed my app to replace any huge tables with joins to temp tables (which I build up with only the records needed), making the joins astronomically cheaper.

This caused a new problem: I'm using tempdb too much. Too many temp tables are being created, filled, queried, and dropped in rapid succession.

It took me 14 solid hours of research and troubleshooting... multiple iterations of recreating the database from script, repopulating data, testing, hitting the "kill state," swearing a bit, revising my create database script, rinse and repeat.

The real problem for me is both temp tables and linked servers have been known to cause this issue... along with corrupt indexes... and who knows what else. So I had no clue what could be causing this. I had to poke at everything.

So, here's what I did to fix it:

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Blacklisted phrase (1): Did not work
  • Blacklisted phrase (1): what could be
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Wesley Marmon