Author Topic: Postgresql repository connection drops and won't reconnect  (Read 3407 times)

richard.kovach

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Postgresql repository connection drops and won't reconnect
« on: July 05, 2024, 04:52:48 am »
Apologies if this has been previously discussed - I tried several forum and Google searches and have yet to find anything helpful...

I'm using build 1628 - 64 bit, with a remote Postgresql repository (15.3 build 1914 64-bit).  I believe I'm using whatever client connector is installed with Sparx to connect to the repository.

Everything has worked fine the past couple of months, except that after several hours of inactivity Sparx seems to lose the database connectivity and throw up multiple error boxes repeatedly until I either reconnect to the repository or close and reopen Sparx.  The majority of the error messages are typically like "Sparx System Database API [0x00001072]  SQL API Open FAILED with error: ??? Unknown error(7) occurred"

I've used Sparx off and on for years with different types of repositories - definitely the eap and eapx formats, but also lots on SQL Server and I believe some on Oracle many years ago.  On SQL Server for the past 5 years, I would occasionally get these sorts of disconnects if my network or VPN dropped out for a while, but usually when it occurred Sparx would only throw a couple of errors and then seem to reconnect and continue working fine.  But with this Postgresql database it seems unable to reconnect any time the connection has been lost.  It happens several times a week, so is quite annoying.

I've investigated from the Postgresql side and as far as I can tell there is nothing configured on the server to automatically disconnect idle sessions after a period of time.  Most of the time these failures are occurring, my VPN logs don't show any drops during that time period.  The postgresql database is on the same virtual server that our SQL Server repositories are on.

Does anyone have any ideas for how I either avoid these disconnects or allow Sparx to reconnect in a similar manner to how it used to with my SQL Server repos?

Many Thanks,
Richard

Neil Galbraith

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Postgresql repository connection drops and won't reconnect
« Reply #1 on: April 28, 2025, 06:25:44 pm »
Hi Richard,

Did you manage to resolve this?  I'm having the same issue with version 16.1.1622.  About to move to 17, but don't know if that will fix it.

Neil

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1370
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: Postgresql repository connection drops and won't reconnect
« Reply #2 on: May 05, 2025, 08:53:27 pm »
It may be worth setting up a Pro Cloud Server between your EA clients and the Postgres DB.
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com