larskanis / importtest

from bitbucket
0 stars 0 forks source link

PG::ConnectionBad at / #299

Open larskanis opened 5 years ago

larskanis commented 5 years ago

Original report by BeeRich33 (Bitbucket: Rich, GitHub: Rich).


I have a Sinara before SELECT request that’s tripping out after the app is set for a non-restart. Refreshes minutes after this happens, I get this bad connection. I just updated my rbenv to 2.6.2 from 2.5.1. After a manual restart, and all I can think of, this happens.

Under the 2.5.1 version, an hourly refresh of this page happens, and I’ve never seen this error before.

‌ PQconsumeInput() server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.

res = $conn.exec_params( %Q{ SELECT count(id) FROM s_ads_t WHERE status = $1 }, ['new'] )

No output on the troubleshooting output at all.

I have Postico which connects just fine to both local workstation and the remote server (non-SSL).

larskanis commented 5 years ago

Original comment by BeeRich33 (Bitbucket: Rich, GitHub: Rich).


Reverted back to Ruby 2.5.1 and the same issue occurs. Here is my connection:

$conn = PG::Connection.open( host: 'mymachine.local', dbname: 'mydbname' )

Again, no ssl on the LAN.

larskanis commented 5 years ago

Original comment by BeeRich33 (Bitbucket: Rich, GitHub: Rich).


A new instance in Sinatra shows this:

PG::ConnectionBad at /

PQconsumeInput() server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request

Upon refresh:

PG::UnableToSend at /

no connection to the server