The service of worklist isn’t responding

Hello, I have Orthanc 1.9.1 installed on Windows Server, with the Worklist plugin and connected to MySQL.

It used to work correctly, but then it becomes slower, and it doesn’t download the worklists on the computers.

I am testing with the FindSCU program:

findcu -W -k “ScheduledProcedureStepSequence [0] .Modality = US” xxx.xxx.xxx.xxx 4242

It takes 15-25 seconds to respond, sometimes it gets the list, but others it starts and then an error appears:

E: Find Failed, query keys:

E:

E: # Dicom-File-Format

E:

E: # Dicom-Meta-Information-Header

E: # Used TransferSyntax: Little Endian Explicit

E:

E: # Dicom-Data-Set

E: # Used TransferSyntax: Little Endian Explicit

E: (0040,0100) SQ (Sequence with explicit length #=1) # 18, 1 ScheduledProcedureStepSequence

E: (fffe,e000) na (Item with explicit length #=1) # 10, 1 Item

E: (0008,0060) CS [US] # 2, 1 Modality

E: (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem

E: (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem

E:

E: Association release failed: 0006: 031a DUL network read timeout

I: ---------------------------

I: Find Response: 39 (Pending)

I: # Dicom-Data-Set

I: # Used TransferSyntax: Little Endian Explicit

I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet

I: (0040,0100) SQ (Sequence with explicit length #=1) # 18, 1 ScheduledProcedureStepSequence

I: (fffe,e000) na (Item with explicit length #=1) # 10, 1 Item

I: (0008,0060) CS [US] # 2, 1 Modality

I: (fffe,e00d) na (ItemDelimitationItem for re-encoding) # 0, 0 ItemDelimitationItem

I: (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) # 0, 0 SequenceDelimitationItem

E: Association Release Failed: 0006:031a DUL network read timeout

Do you have any ideas?

Thanks, Marcelo

The worklist service is parsing all files in your worklist DB. Don’t forget to remove files once they are too old (e.g the day after the exam) otherwise, finds will become slower and slower …

Thanks Alain, yes, I have contemplated the elimination.

This is the code:
ForFiles / p “c: \ Orthanc \ WorklistDatabase” / s / d -1 / c “cmd / c del @file

The problem continues even with few files.

Thanks, Marcelo.

Hi Marcelo,

I would advise you to have a deep look at Orthanc logs collected at verbose level first and potentially with dicom-trace level:

This can be achieved with these commands:
curl -X PUT http://localhost:8042/tools/log-level -d “verbose”
curl -X PUT http://localhost:8042/tools/log-level-dicom -d “trace”

In the first mode, you should already seen how many files are being opened, …
In the second mode, you’ll see what’s going on at the DICOM level.

If you don’t find anything weird there, feel free to share your logs.

Alain

Hello Alain, thanks for the contributions, now I share my experience.

The error was caused by a modification in the MySQL my.ini file.

The default parameter is max_allowed_packet = 4M, I had modified it to max_allowed_packet = 100M.

I went back to 4M and everything worked again.

Thanks, Marcelo

After changing max_allowed_packet = 4M, I started getting this error:

E0318 10: 02: 22.931039 PluginsManager.cpp: 164] MySQL error (2006, HY000): MySQL server has gone away

W0318 10: 02: 22.931039 PluginsManager.cpp: 168] An active MySQL transaction was dismissed

E0318 10: 02: 22.931039 PluginsManager.cpp: 164] MySQL error (2006, HY000): MySQL server has gone away

E0318 10: 02: 22.931039 PluginsManager.cpp: 164] The database is not available, closing the connection

E0318 10: 02: 22.931039 PluginsManager.cpp: 164] Cannot rollback a non-existing transaction

E0318 10: 02: 22.931039 PluginsManager.cpp: 164] Uncatched error during some transaction rollback: Bad sequence of calls

W0318 10: 02: 22.931039 PluginsManager.cpp: 168] Your MySQL server cannot store DICOM files larger than 4MB

W0318 10: 02: 22.931039 PluginsManager.cpp: 168] => Consider increasing “max_allowed_packet” in “my.cnf” if this limit is insufficient for your use

E0318 10: 02: 22.946665 StoreScp.cpp: 197] Exception while storing DICOM: The database is currently not available (probably a transient situation)

E0318 10: 02: 30.135342 OrthancException.cpp: 57] Error in the network protocol: DicomAssociation - connecting to AET “xxxxx”: Failed to establish association (0006: 0317 Peer aborted Association (or never connected); 0006: 031c TCP Initialization Error : The operation completed successfully. (Timeout))

Images are not stored in the PACS.

Please, read the logs before posting them. It says that you should increase the max_allowed_packet config.

The worklist timeout can not be related to this config since the worklist plugin is not using the MySQL DB.

Have you checked your logs related to the worklist ?