Closed PNixx closed 1 year ago
The connection may be going away, resulting in this call returning -1. Can you try reducing the idle timeout on your pool and see if that helps?
I added a check for a closed connection 34f748237f138da8d3b805de84e2767239635ed6, so you could also try with master and see if that eliminates the error, as it should close the connection, resulting in the connection being removed from the pool.
Did not help. I see a same error:
pg_connection_busy(): Cannot set connection to nonblocking mode, /project/vendor/amphp/postgres/src/PgSqlHandle.php:117
I haven't been able to reproduce this. Any tips?
Try connection with pgbouncer.
I try similar errors with version 1.4.1:
pg_connection_busy(): Cannot set connection to nonblocking mode, /project/vendor/amphp/postgres/src/PgSqlHandle.php:122
I think I have found the reason for this error. I use pgbouncer with pool 20, my php worker pool 20 and other app with pool 20. When the php worker is running at full capacity, I get this error. Because an other app uses connections too.
Sounds like this issue was due to something external to this library, so I'm closing this issue.
I see a same error on v1.3.3. I set a pool 10 connection and receive error after 1-2 minutes:
When I used pool 5, I did not observe such a problem.
Similar issue: https://github.com/amphp/postgres/issues/13