Hi, I'm replying to the list as well... because the last two mails got replied to our personal addresses.
On Thu, Aug 20, 2020 at 11:55 AM Sven Van Caekenberghe <s...@stfx.eu> wrote: > > On 20 Aug 2020, at 15:31, Esteban Maringolo <emaring...@gmail.com> wrote: > > > > Hi Sven, > > > > If a socketstream doesn't know the state of the connection, then what > > is the #socketIsConnected method for? In particular the > > #isOtherEndClosed test. > > > > ZdcAbstractSocketStream>>#socketIsConnected > > ^socket isConnected and: [ socket isOtherEndClosed not ] > > I don't know what is going on inside Socket, I just stated my opinion. Maybe there is something to investigate here? > With logging enabled, I can do the following: > > $ grep P3 server-2020-08-20.log | grep CONNECT | tail -n 20 > <snip> > 2020-08-20 14:43:06 [P3] 30513 DISCONNECTING > psql://client-xyz:hiddenpassword@client-xyz-db:5432/client-xyz > 2020-08-20 14:44:06 [P3] 30516 CONNECTED > psql://client-xyz:hiddenpassword@client-xyz-db:5432/client-xyz > 2020-08-20 14:44:06 [P3] 30516 DISCONNECTING > psql://client-xyz:hiddenpassword@client-xyz-db:5432/client-xyz > 2020-08-20 14:44:06 [P3] 30517 CONNECTED > psql://client-xyz:hiddenpassword@client-xyz-db:5432/client-xyz > 2020-08-20 14:44:06 [P3] 30517 DISCONNECTING > psql://client-xyz:hiddenpassword@client-xyz-db:5432/client-xyz > > The number after [P3] is the session identifier (backend process id) of that > connection. You should see each one being opened and closed in pairs. Yes, I noticed the pid, and compared it with what I had on the pg_stat_activity table. I don't get the CONNECTED log because there is no way to set the logging in the P3DatabaseDriver before it creates (and connects) the P3Client. Maybe there could be a setting on P3Client class to set verbosity globally? Or at the P3DatabaseDriver instead. Summarizing... I'm pretty confident that P3 works correctly and also the PG server. At this point I'm factoring out what might be causing this. It's an issue that only happens to me in production, and I don't have a better instrumentation in place to debug it. Again, thanks for the support. Regards.