distal-attribute
distal-attribute
distal-attribute
distal-attribute

Client hangs during long running query

jsdeter posted 3 years ago in General
I'm experiencing a situation where the client, either HeidiSQL or the command line tool, when running a long execution time query will hang. When checking the process on the server, it completes but the client fails to get the signal the work is complete. For HeidiSQL the only option is to close down the app. (Same for command line client). Interestingly, if I run the same query on the server it works normally. I haven't figured out the threashold time frame to trigger this behavior. Many times it seems random.

There must be some setting that is closing off the connection. I've checked the normal timeouts etc. with no success.

Just wondered if anyone has seen this same thing before.
ansgar posted 3 years ago
Probably you mean the server has finished the query but the client needs to retrieve the data afterwards, which can take veery long and depends on the result size. Running that on the server directly will reduce this time to a minimum, so it's surely faster there.
ansgar posted 3 years ago
Btw: HeidiSQL also tells you the network time a query took, see the SQL log after a query finished.
jsdeter posted 3 years ago
I should add that this occurs when running a stored procedure that doesn't return any data. I've seen happen for a long time and most of the time I remote desktop into the server to run long procedures. As we get more people on the system, that isn't practical so I need to find out what's happening.
ansgar posted 3 years ago
Is that happening also on other queries which take a few seconds, for example when you run

SELECT BENCHMARK(100000000, 10*10)

?

Please login to leave a reply, or register at first.