You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into this error with an opaleye program. I can't really reproduce the error deterministically -- it seems to be occasional and random. Googling this error message turns up some possible explanations such as data not being read completely by the client. There is also an issue filed on postgresql-simple's issue track about the same error message, but the discussion was mostly about transaction and async exception, and there doesn't seem to be any conclusive decision.
My program does not use transaction, but it does run queries from more than one thread. So has anybody here run into the same error before? If so, what is the best practice to debug it? Or alternatively, what is the best practice to gracefully handle this error, e.g., where to catch it and maybe restart a new DB connection?
Any help is greatly appreciated!
Update 1: when this error happens, my program become unusable and must be shutdown likely because no DB query would go through any more.
Update 2: my program does use async exception, and it could happen to a thread at the time when it is doing some DB query. Maybe I should just mask the DB part?
The text was updated successfully, but these errors were encountered:
Hi Paul, this is indeed an issue at a lower level than Opaleye. I suggest you continue the discussion on the postgresql-simple issue tracker. In particular you might want to discuss it with @hesselink. He has been using Opaleye.
If you're using async exceptions, it sounds like the same issue. You could push a bit harder for a fix on that postgresql-simple issue. If you're just using the async exceptions for timeouts, you could use my workaround posted there.
Thank you @hesselink@tomjaguarpaw . I didn't use timeout, but I was using async exception as a way to pass messages. I've since rewritten the code using channels, so I'll close this issue for now. I'll follow up on the postgresql-simple issue tracker if the problem comes up again.
I am running into this error with an opaleye program. I can't really reproduce the error deterministically -- it seems to be occasional and random. Googling this error message turns up some possible explanations such as data not being read completely by the client. There is also an issue filed on postgresql-simple's issue track about the same error message, but the discussion was mostly about transaction and async exception, and there doesn't seem to be any conclusive decision.
My program does not use transaction, but it does run queries from more than one thread. So has anybody here run into the same error before? If so, what is the best practice to debug it? Or alternatively, what is the best practice to gracefully handle this error, e.g., where to catch it and maybe restart a new DB connection?
Any help is greatly appreciated!
Update 1: when this error happens, my program become unusable and must be shutdown likely because no DB query would go through any more.
Update 2: my program does use async exception, and it could happen to a thread at the time when it is doing some DB query. Maybe I should just mask the DB part?
The text was updated successfully, but these errors were encountered: