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
Our application using postgresql-simple 0.6.2 is throwing the below error without any information on queries randomly
It's reproducable but not deterministically, we'll get the following error on any query of our application randomly like one in say 5000 times. The exact same queries would be working every other time, the db host's metrics and connectivity seems to be well under limits and in a healthy condition.
I have traced this issue till the function queryWith_ (Simple.hs:407), it seems to be calling exec to get PQ.Result.
Interestingly, I have found some FIXME comments in the implementation of exec.
...where
awaitResult h mres =do
mfd <-PQ.socket h
case mfd ofNothing-> throwIO $! fdError "Database.PostgreSQL.Simple.Internal.exec"Just fd ->do
threadWaitRead fd
_ <-PQ.consumeInput h -- FIXME?
getResult h mres
getResult h mres =do
isBusy <-PQ.isBusy h
if isBusy
then awaitResult h mres
elsedo
mres' <-PQ.getResult h
case mres' ofNothing->case mres ofNothing-> throwLibPQError h "PQgetResult returned no results"Just res ->return res
Just res ->do
status <-PQ.resultStatus res
case status of-- FIXME: handle PQ.CopyBoth and PQ.SingleTuplePQ.EmptyQuery-> getResult h mres'
...
Any ideas or pointers to fix this issue would be very helpful, also is this a know issue?
The text was updated successfully, but these errors were encountered:
0.6.2 is an old release. While I don't think the issue is fixed, having a reproducer with the latest release of postgresql-simpl (and postgresql-libpq) is the most important first step. I won't look into older releases.
Our application using postgresql-simple 0.6.2 is throwing the below error without any information on queries randomly
It's reproducable but not deterministically, we'll get the following error on any query of our application randomly like one in say 5000 times. The exact same queries would be working every other time, the db host's metrics and connectivity seems to be well under limits and in a healthy condition.
I have traced this issue till the function
queryWith_
(Simple.hs:407), it seems to be callingexec
to getPQ.Result
.Interestingly, I have found some
FIXME
comments in the implementation ofexec
.Any ideas or pointers to fix this issue would be very helpful, also is this a know issue?
The text was updated successfully, but these errors were encountered: