Bug 15 - PostgreSQL exceptions after time
Summary: PostgreSQL exceptions after time
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Plugin - PostgreSQL (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2020-06-29 15:11 CEST by Sébastien Jodogne
Modified: 2020-06-29 15:18 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sébastien Jodogne 2020-06-29 15:11:27 CEST
[BitBucket user: Toshko Andreev]
[BitBucket date: 2016-02-22.07:09:50]

I've been running Orthanc with the PostgreSQL plugins for some time now and it appears that after about 10 hours of inactivity an exception occurs with Postgre:

```
#!Log
E0220 03:20:51.562601 PluginsManager.cpp:163] Exception in database back-end: Error in PostgreSQL: server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.


E0220 06:51:03.924868 PluginsManager.cpp:163] Exception in database back-end: Error in PostgreSQL: no connection to the server
```

Orthanc at that point becomes broken and cannot work until you restart the service (Windows 7 x64).
Comment 1 Sébastien Jodogne 2020-06-29 15:18:50 CEST
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2016-02-24.09:44:27]

This issue was discussed on the mailing list: https://groups.google.com/d/msg/orthanc-users/RQOqFB-zDmc/qqSJoVzqBAAJ

This timeout problem can be solved by enabling keep alive (e.g. to 120 seconds) in the configuration of the PostgreSQL server: http://dba.stackexchange.com/questions/97534/is-there-a-timeout-option-for-remote-access-to-postgresql-database