pg
pg copied to clipboard
Query timeouts cause model mismatch errors
A while back we tried the following change:
opts.ReadTimeout = 3 * time.Second // max time for SELECT
opts.WriteTimeout = 3 * time.Second // max time for INSERT, UPDATE, or DELETE
We would then get occasional errors along the lines of pg: can't find column=foo in model=bar
.
Our theory is that timed out queries can return their outputs to other queries.
This was an issue back when we were on v6.35, and I just managed to reproduce it on v8.06 by setting timeouts of 500 milliseconds. Got it 12 times in an hour of testing merely by cranking up the number of workers in a sandbox environment.
As far as I can tell, the way to reproduce this is to have a high volume of queries which are not all the same, and some of which time out and some of which don't.
Please let me know if you need any more information. I would very much like to have query timeouts, so this is a big blocker.
The first step here is to create a reproducer that can replicate a problem in sensible time (ideally within minutes). Without that don't expect much progress soon...
I believe this is still an issue, BTW
Kind of strange to close it just because I don't have time to make a reproducer, no? Maybe somebody else will encounter it and comment here