Orthanc and PostgreSQL show error when connect

Hi, I am using Orthanc with SQL Plugin and I am connect Orthanc to PostgreSQL. When both start, everything is ok from the beginning but after that, I’ve received some errors. I tried to restart PostgreSQL but the error logs were still displayed.
Here they are:

2022-03-03 07:56:43.062 GMT [1] LOG: listening on IPv4 address “0.0.0.0”, port 5432
2022-03-03 07:56:43.062 GMT [1] LOG: listening on IPv6 address “::”, port 5432
2022-03-03 07:56:43.065 GMT [1] LOG: listening on Unix socket “/tmp/.s.PGSQL.5432”
2022-03-03 07:56:43.070 GMT [88] LOG: database system was interrupted; last known up at 2022-03-03 07:52:37 GMT
2022-03-03 07:56:43.140 GMT [88] LOG: database system was not properly shut down; automatic recovery in progress
2022-03-03 07:56:43.143 GMT [88] LOG: redo starts at 5/A99FEB00
2022-03-03 07:56:43.143 GMT [88] LOG: invalid record length at 5/A9A0D040: wanted 24, got 0
2022-03-03 07:56:43.143 GMT [88] LOG: redo done at 5/A9A0D008 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s
2022-03-03 07:56:43.187 GMT [1] LOG: database system is ready to accept connections
2022-03-03 08:27:12.725 GMT [96] ERROR: could not serialize access due to read/write dependencies among transactions
2022-03-03 08:27:12.725 GMT [96] DETAIL: Reason code: Canceled on identification as a pivot, during write.
2022-03-03 08:27:12.725 GMT [96] HINT: The transaction might succeed if retried.
2022-03-03 08:27:12.725 GMT [96] STATEMENT: INSERT INTO ServerProperties VALUES ($1, $2, $3)
2022-03-03 08:33:48.246 GMT [96] ERROR: could not serialize access due to read/write dependencies among transactions
2022-03-03 08:33:48.246 GMT [96] DETAIL: Reason code: Canceled on identification as a pivot, during write.
2022-03-03 08:33:48.246 GMT [96] HINT: The transaction might succeed if retried.
2022-03-03 08:33:48.246 GMT [96] STATEMENT: INSERT INTO ServerProperties VALUES ($1, $2, $3)
2022-03-03 09:31:31.261 GMT [96] ERROR: could not serialize access due to read/write dependencies among transactions
2022-03-03 09:31:31.261 GMT [96] DETAIL: Reason code: Canceled on identification as a pivot, during write.
2022-03-03 09:31:31.261 GMT [96] HINT: The transaction might succeed if retried.
2022-03-03 09:31:31.261 GMT [96] STATEMENT: INSERT INTO ServerProperties VALUES ($1, $2, $3)
2022-03-03 10:04:43.408 GMT [96] ERROR: could not serialize access due to read/write dependencies among transactions
2022-03-03 10:04:43.408 GMT [96] DETAIL: Reason code: Canceled on identification as a pivot, during write.
2022-03-03 10:04:43.408 GMT [96] HINT: The transaction might succeed if retried.
2022-03-03 10:04:43.408 GMT [96] STATEMENT: INSERT INTO ServerProperties VALUES ($1, $2, $3)

And here is the log of the Orthanc

E0303 08:54:56.765724 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:02:19.629316 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:05:46.590316 PluginsManager.cpp:197] Exception while invoking plugin service 2000: Error in the network protocol

E0303 09:05:46.590636 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:07:11.265546 PluginsManager.cpp:197] Exception while invoking plugin service 2000: Error in the network protocol

E0303 09:07:11.265600 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:08:15.759735 PluginsManager.cpp:197] Exception while invoking plugin service 2000: Error in the network protocol

E0303 09:08:15.759794 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:08:53.269130 PluginsManager.cpp:197] Exception while invoking plugin service 2000: Error in the network protocol

E0303 09:08:53.269189 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:20:27.750429 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 09:21:57.851885 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

E0303 10:04:46.860411 PluginsManager.cpp:197] Exception while invoking plugin service 2000: Error in the network protocol

E0303 10:04:46.860566 HttpOutput.cpp:70] This HTTP answer has not sent the proper number of bytes in its body

Everything on the OHIF Viewer seems fine (or I think so), but how can I avoid these issues, thanks!

Hi,

Hard to tell what’s wrong without more details about your setup: https://book.orthanc-server.com/users/support.html#discussing-a-minimal-working-example

From a first look, the PG logs show that some transactions need to be re-run because of conflicts when writing a server property (something like the list of DicomModalities, Peers, …). This is normal that such a conflict can occur if you have multiple Orthanc writing to the same DB.

And your Orthanc logs show errors that are not related to that.

Best regards,

Alain.