Looking at the Postgres side of the log I find that the connection was reset from the other side (it is Pharo). The reason for that is yet unknown to me. Since I don't do anything (that I'm aware of). golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:02:35.939 UTC [132] LOG: could not receive data from client: Connection reset by peer golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:06:58.083 UTC [139] LOG: could not receive data from client: Connection reset by peer golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:06:58.083 UTC [137] LOG: could not receive data from client: Connection reset by peer golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:33:20.163 UTC [166] LOG: could not receive data from client: Connection reset by peer golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:35:22.019 UTC [168] LOG: could not receive data from client: Connection reset by peer golfware_database.1.9sl4bt9j6cv5@gw | 2020-08-10 20:37:33.091 UTC [177] LOG: could not receive data from client: Connection reset by peer I'll have to keep looking. Best regards! Esteban A. Maringolo On Mon, Aug 10, 2020 at 5:35 PM Esteban Maringolo <emaringolo@gmail.com> wrote:
My Seaside session isn't closing the connection, only when unregistered, but this seems to be something else I don't know.
I saw there is logging, and I need to set it up in general (including Fuel serialized stacks). Looking in the web apparently there is the need for a keepalive that is not in place. What disturbs me is that it doesn't happen in development. Making things harder.
Regards!
Esteban A. Maringolo
On Mon, Aug 10, 2020 at 5:02 PM Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi Esteban,
I have a web app with P3 under Seaside in production and it works fine. But that is without Glorp, nor any connection pooling.
You say the connection seems closed, maybe the closing got triggered by your app somehow ? How do you clean up expired sessions ? How do you handle logouts ?
P3 does normally reconnect automatically, IIRC.
You could try to enable logging in P3Client, that is a recent addition. It should show you what happens to your connections.
Sven
On 10 Aug 2020, at 21:15, Esteban Maringolo <emaringolo@gmail.com> wrote:
Hi all, Sven ;-)
I'm having erratic P3 errors in a recent application I wrote using Pharo, Seaside and Glorp with P3 as driver.
Each Seaside session has a GlorpSession, which in turn has a P3Connection in its accessor. I don't know why, but sometimes the P3Connection socket is closed, and then when trying to read from the database, it cannot write the query to the P3 socket and exception is raised, and it isn't handled by the P3DatabaseDriver (automatically trying to reconnect?).
I don't know if I'm doing something wrong, I plan to migrate the GlorpPooledDatabaseAccessor and also use the P3ConnectionPool, but I want to be sure that the current setup works of if maybe I'm exceeding some limit or timeout that causes the connection to be closed.
Regards!
Esteban A. Maringolo