PQconsumeInput() could not receive data from server: Connection timed out SSL SYSCALL error: Connection timed out
We are facing this error "PQconsumeInput() could not receive data from server: Connection timed out SSL SYSCALL error: Connection timed out" intermittently in our rails application with versions Ruby Version - 3.2.5 Rails Version - 7.1.3.3 We have increased the pool count, reaping_frequency and timeout pool: 20 timeout: 30000 checkout_timeout: 30 reaping_frequency: 10 We have reduced the worker concurrency as well but nothing was helpful. We have implemented monkey patching for activerecord postgresql adapter to reconnect the pool and database. ConnectionNotEstablished.new(exception, connection_pool: @pool) ActiveRecord::Base.connection.reconnect! issue is not resolved even after this. We have verified all the database configurations as well and nothing found suspicious. Could you please suggest how could we fix this intermittent PG issue ?

We are facing this error "PQconsumeInput() could not receive data from server: Connection timed out SSL SYSCALL error: Connection timed out" intermittently in our rails application with versions
Ruby Version - 3.2.5
Rails Version - 7.1.3.3
We have increased the pool count, reaping_frequency and timeout
pool: 20
timeout: 30000
checkout_timeout: 30
reaping_frequency: 10
We have reduced the worker concurrency as well
but nothing was helpful.
We have implemented monkey patching for activerecord postgresql adapter to reconnect the pool and database.
ConnectionNotEstablished.new(exception, connection_pool: @pool)
ActiveRecord::Base.connection.reconnect!
issue is not resolved even after this.
We have verified all the database configurations as well and nothing found suspicious.
Could you please suggest how could we fix this intermittent PG issue ?