#34454 closed Bug (needsinfo)
Connection failed with error message "FATAL: password authentication failed for user 'user'"
Reported by: | nainiu | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 4.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
I am using psycopg3 package with Django to connect to a PostgreSQL database. However, I am experiencing occasional connection failures with the following error message:
"Connection failed with error message: FATAL: password authentication failed for user 'user'"
The error seems to occur randomly, and I am not sure what is causing it. I have double-checked that the username and password specified in the DATABASES setting in my Django project are correct and have the necessary permissions to access the database.
I am using psycopg3 version 3.1.8 and Django version 4.2rc1.
/This error can occur randomly, and sometimes it can be correctly linked to the database
Change History (3)
comment:1 by , 20 months ago
Description: | modified (diff) |
---|
follow-up: 3 comment:2 by , 20 months ago
Description: | modified (diff) |
---|---|
Resolution: | → needsinfo |
Status: | new → closed |
comment:3 by , 20 months ago
Replying to Tim Graham:
I don't think you've provided enough details to make this ticket actionable. I guess you will need to debug the issue further or at least provide a minimal sample project that reproduces the problem. I guess the issue doesn't occur with pyscopg2?
Yes, this issue does not occur in psycopg2. Currently, I have not found a stable way to reproduce it, and I have also examined the 'conninfo' information in psycopg\connection.py and found that it is the same every time.
After contacting my cloud database provider, they said that the problem may be caused by an error after connecting to the same container. I noticed that there is an additional database connection before each error occurs.
I don't think you've provided enough details to make this ticket actionable. I guess you will need to debug the issue further or at least provide a minimal sample project that reproduces the problem. I guess the issue doesn't occur with pyscopg2?