How to solve Opening JDBC connection to Some(localhost:5432) failed with SQLState: 53300?
0
Hi all! I'm working on a Mendix app which uses PostgreSQL.When I run it locally sometimes I get this error: ------------------ Opening JDBC connection to Some(localhost:5432) failed with SQLState: 53300 Error code: 0 Message: FATAL: sorry, too many clients already Retrying...(1/4) ------------------ Followed by this warning: Database connections: 0 active, 39 idle. These 2 elements (error + warning) are continuously repeated in loop in the log, in a very fast way, like 5 times per second. Also I can see that in "pgAdmin 4" many sessions (like 50) have been created to the database. After a while I have to turn off the app. What can be the cause of this errror? What should I investigate? Thanks
asked
Claudio Landi
1 answers
0
Check the current active sessions.
And check if you have a commit in a loop. Instead, in the loop: add to a list, and after the loop commit the list.