https://www.ory.sh/ logo
#talk-hydra
Title
# talk-hydra
s

sparse-summer-28638

01/07/2022, 11:24 AM
Hello friends, we are stating to see a lot of
sql: transaction has already been committed or rolled back
errors in our logs which we suspect is causing the hydra
/health/ready
endpoint to fail. Have any of you people seen this before? we are using Hydra v. 1.10.7 with a postgresql database.
1
b

boundless-hydrogen-45841

01/07/2022, 11:48 AM
can you share your code example
s

sparse-summer-28638

01/07/2022, 11:52 AM
Well, it is Hydra that is logging the error, so I do not have any code to show. This is in the logs from running the hydra executable.
👍 1
h

high-optician-2097

01/07/2022, 12:09 PM
Check in the DB for connection error and try to restart hydra and7or the db
s

sparse-summer-28638

01/07/2022, 12:35 PM
Restarting fixes the issue temporarily but after some time it returns. The database errors all seem to happen when calling the
/oauth2/token
endpoint.
It seems that when the
/health/ready
endpoint fails it returns
Copy code
{
  "errors": {
    "migrations": "error may contain sensitive information and was obfuscated"
  }
}
in the body
h

high-optician-2097

01/08/2022, 10:30 AM
In that case you might need to fix up your DSN: https://www.ory.sh/docs/ecosystem/deployment/
i.e. maxconidle lifetime etc
s

sparse-summer-28638

01/10/2022, 7:23 AM
I think we figured out the issue. Circling back to our DSN as you suggested we took a look at the database and saw that it was depleted of resources. Allocating more resources to the database seems to have fixed the issue. Thank you all for the helpful suggestions 🙏
7 Views