MySQL error in log after Anonymization

180 views
Skip to first unread message

Martin Krämer

unread,
Jun 28, 2021, 8:42:14 AM6/28/21
to Orthanc Users
Hi Everyone,

When anonymizing a patient stored in fresh Orthanc instance I have noticed that, although everything appears to work fine (anonymized patient is created) there is a regular error message starting to appear in the logs:

T0628 10:00:47.150741 ServerContext.cpp:254] Serializing the content of the jobs engine
E0628 10:00:47.158729 PluginsManager.cpp:164] MySQL error (1406,22001): Data too long for column 'value' at row 1
I0628 10:00:47.158796 PluginsManager.cpp:172] (plugins) An active MySQL transaction was dismissed
I0628 10:00:47.172269 PluginsManager.cpp:172] (plugins) Cannot rollback a non-existing transaction
I0628 10:00:47.172328 StatelessDatabaseOperations.cpp:554] Cannot rollback transaction: Bad sequence of calls
E0628 10:00:47.172586 ServerContext.cpp:268] Cannot serialize the jobs engine: Error with the database engine

The same message is then repeated every 10 seconds. I would assume that this is related to the MySQL plugin and the question is how severe this is. After restarting Orthanc the message goes away (until anonymizing another patient).

A couple of notes:
  • running Orthan 1.9.4 on CentOS 8
  • tried with MySQL plugin 4.0 and the latest mainline binary from 27 June 2021
  • it does not matter if the anonymization is triggered via REST API or Orthanc Explorer
  • is not limited to the anonymization of patients but also happens for series
here is the config of the MySQL plugin used:
{
  "MySQL" : {
    "EnableIndex" : true,
    "EnableStorage" : false,
    "Host" : "xxx",    
    "Port" : xxx,      
    "UnixSocket" : "",  
    "Database" : "xxx",
    "Username" : "xxx",
    "Password" : "xxx",
    "EnableSsl" : false,     
    "SslVerifyServerCertificates": true, 
    "SslCACertificates": "",            
    "Lock" : true,                      
    "MaximumConnectionRetries" : 10,    
    "ConnectionRetryInterval" : 5,      
    "IndexConnectionsCount" : 1         
  }
}

Sébastien Jodogne

unread,
Jun 28, 2021, 9:27:50 AM6/28/21
to Orthanc Users
Hello,

What is your version of MySQL?

I am unable to reproduce this "data too long" error using MySQL 5.7 and MySQL 8.0.

This error corresponds to the fact that it is not possible for Orthanc to write a large JSON (that contains a serialized version of all its jobs) into the "GlobalProperties" table of the MySQL database.

For reference, here is the file that initializes the MySQL database, where one can see that the "value" column of the "GlobalProperties" table is set to the "TEXT" type, which should allow for long texts:

Sébastien-

Martin Krämer

unread,
Jun 28, 2021, 9:42:47 AM6/28/21
to Orthanc Users
Hi Sébastien,

sorry for missing out on this information, completely forgot to mention this. 

I'm actually using MariaDB version 10.3.28.
According to the MariaDB documentation TEXT supports a maximum length of 65,535 (216 - 1) characters.

I checked the database and it's actually set to LONGTEXT which is supposed to hold 4GB of information,

MariaDB> SHOW COLUMNS  FROM GlobalProperties;
+----------+----------+------+-----+---------+-------+
| Field    | Type     | Null | Key | Default | Extra |
+----------+----------+------+-----+---------+-------+
| property | int(11)  | NO   | PRI | NULL    |       |
| value    | longtext | YES  |     | NULL    |       |
+----------+----------+------+-----+---------+-------+

best wishes
Martin

Sébastien Jodogne

unread,
Jun 28, 2021, 9:50:05 AM6/28/21
to Orthanc Users
You're right: The "TEXT" from SQL is automatically patched as a "LONGTEXT" by the C++ code of the plugin:

So, this shouldn't be the issue. There is visibly something specific with MariaDB that doesn't appear with MySQL.

Sébastien Jodogne

unread,
Jun 28, 2021, 11:10:32 AM6/28/21
to Orthanc Users
I cannot reproduce using MariaDB 10.3.30 running in Docker.

Could you make sure that the value of the "max_allowed_packet" option is large enough in your configuration?

If this this not the cause of the problem, please provide us with a systematic way to reproduce your issue:

Sébastien-

Martin Krämer

unread,
Jun 29, 2021, 2:34:06 AM6/29/21
to Orthanc Users
I have tried the following things:
  • increase max_allowed_packet to 256 MB -> still the same problem
  • update MariaDB to version 10.5.11 -> still the same problem
So I indeed would now also assume that it's a problem with my setup. 
I will try to set-up a fresh Orthanc installation on the same CentOS 8 system using latest stable linux standard base with a new DB and minimal plugins (e.g. only the MySQL plugin).

Is there anything else I could try to on the existing system, like purging any particular (temporary?) database table?
Could it be related to the fact that I'm only using the MySQL Index Plugin but not the MySQL Storage Plugin?

Martin

Sébastien Jodogne

unread,
Jun 29, 2021, 3:10:56 AM6/29/21
to Orthanc Users
Yes, I think that trying with a fresh installation would be the best.

To fully reset the MySQL/MariaDB database, the command "DROP DATABASE [orthanc database]" should be sufficient. You could also try running MariaDB from a Docker container in order to make sure that no problematic configuration is in use, for instance:

$ docker run -e MARIADB_ROOT_PASSWORD=root -e MARIADB_DATABASE=orthanctest --rm -t -i -p 3306:3306 --name mariadb mariadb:10.3 --max-allowed-packet=67108864

In either case, this has nothing to do with the fact that you don't use the MySQL storage plugin.

Sébastien-

Martin Krämer

unread,
Jun 29, 2021, 6:54:36 AM6/29/21
to Orthanc Users
Unfortunately even after setting up a new Instance the problem remains.
Below is what I did to set it up as a shell and MySQL history (I hope I did nothing utterly stupid).

I did also give it several different tries (while dropping the database in between runs) and what I have observed is that interestingly it does not appear to happen for a single DICOM instance or even a few DICOM instances. So I tried with a dataset that had 50 Instances and did simply run the anonymization multiple times. The first couple of times it appeared to work but then suddenly the error came up again. So I tried to narrow it down and it appears to be triggered at around when 200 instances are anonymized (or have been anonymized if done multiple times). 

hope that helps
Martin


-----------------------
History:
sudo mkdir /usr/local/bin/Orthanc_Test/
sudo cd /usr/local/bin/Orthanc_Test/
sudo chmod u+x lib* Orthanc OrthancRecoverCompressedFile UnitTests
sudo mkdir plugins
cd plugins/
sudo chmod u+x libOrthancMySQLIndex.so
cd ..
sudo mkdir config
cd config
sudo nano dicom.json
sudo nano general.json
sudo nano mysql.json
sudo nano http.json
sudo nano ssl.json
cd ..

mysql -u root -p
CREATE DATABASE orthanc_test;
GRANT ALL PRIVILEGES ON `orthanc_test`.* TO 'orthanc'@'localhost'

sudo ./Orthanc config --logfile=log.txt --verbose

cd ..some..dicom..directory..
storescu +sd localhost 5505 .



The content of all config files:
dicom.json:
{
        "DicomServerEnabled" : true,
        "DicomAet": "TEST",
        "DicomPort": 5505,
        "DicomAlwaysAllowEcho" : true,
        "DicomAlwaysAllowStore" : true,
        "DicomAlwaysAllowFind" : false,
        "DicomAlwaysAllowGet" : false,
        "DicomCheckModalityHost" : true
}

general.json:
{
        "Name": "ORTHANC TEST",
        "StorageDirectory" : "/storage/orthanc_test",
        "IndexDirectory" : "/storage/orthanc_test",
        "Plugins" : [
                "../plugins/libOrthancMySQLIndex.so"
        ]
}

http.json:
{
        "HttpServerEnabled" : true,
        "HttpPort": 5507,
        "RemoteAccessAllowed": true,
        "AuthenticationEnabled": true,
        "RegisteredUsers": {
                "TEST": "TEST"
        }
}

mysql.json:
{
  "MySQL" : {
    "EnableIndex" : true,
    "EnableStorage" : false,
    "Host" : "localhost",    // For TCP connections (notably Windows)
    "Port" : 3306,           // For TCP connections (notably Windows)
    "UnixSocket" : "",  // For UNIX on localhost
    "Database" : "orthanc_test",
    "Username" : "orthanc",
    "Password" : "XXX",
    "EnableSsl" : false,     // force SSL connections
    "SslVerifyServerCertificates": true, // Verify server certificates if EnableSsl is true
    "SslCACertificates": "",             // Path to CA certificates to validate servers
    "Lock" : true,                       // See section about Locking
    "MaximumConnectionRetries" : 10,     // New in release 3.0
    "ConnectionRetryInterval" : 5,       // New in release 3.0
    "IndexConnectionsCount" : 1          // New in release 4.0
  }
}

ssl.json:
{
        "SslEnabled" : true,
        "SslCertificate" : "/usr/local/bin/Orthanc/ssl_certificate.pem"
}



Log file (parts of it):
[...]
W0629 10:01:29.219789 main.cpp:1942] Orthanc version: 1.9.4
I0629 10:01:29.219895 main.cpp:1974] Architecture: 64-bit, little endian
W0629 10:01:29.219986 OrthancConfiguration.cpp:117] Scanning folder "config" for configuration files
W0629 10:01:29.220068 OrthancConfiguration.cpp:66] Reading the configuration from: "config/general.json"
W0629 10:01:29.220281 OrthancConfiguration.cpp:66] Reading the configuration from: "config/dicom.json"
W0629 10:01:29.220404 OrthancConfiguration.cpp:66] Reading the configuration from: "config/mysql.json"
W0629 10:01:29.220571 OrthancConfiguration.cpp:66] Reading the configuration from: "config/http.json"
W0629 10:01:29.220676 OrthancConfiguration.cpp:66] Reading the configuration from: "config/ssl.json"
I0629 10:01:29.220750 Toolbox.cpp:1488] Setting up the ICU common data
I0629 10:01:29.605017 Toolbox.cpp:1467] Using locale: "en_US.UTF-8" for case-insensitive comparison of strings
I0629 10:01:29.605588 Toolbox.cpp:1759] OpenSSL version: OpenSSL 1.1.1k  25 Mar 2021
I0629 10:01:29.606023 FromDcmtkBridge.cpp:291] (dicom) Using DCTMK version: 366
I0629 10:01:29.606075 FromDcmtkBridge.cpp:299] (dicom) Loading the embedded dictionaries
I0629 10:01:29.628814 FromDcmtkBridge.cpp:311] (dicom) Loading the embedded dictionary of private tags
I0629 10:01:29.642664 FromDcmtkBridge.cpp:2293] (dicom) Registering JPEG Lossless codecs in DCMTK
I0629 10:01:29.642695 FromDcmtkBridge.cpp:2301] (dicom) Registering JPEG codecs in DCMTK
I0629 10:01:29.642723 FromDcmtkBridge.cpp:2308] (dicom) Registering RLE codecs in DCMTK
I0629 10:01:29.642737 Enumerations.cpp:2275] Default encoding for DICOM was changed to: Latin1
W0629 10:01:29.653884 main.cpp:864] Loading plugin(s) from: config/../plugins/libOrthancMySQLIndex.so
W0629 10:01:29.655251 PluginsManager.cpp:269] Registering plugin 'mysql-index' (version 4.0)
W0629 10:01:29.655691 PluginsManager.cpp:168] The index plugin will use 1 connection(s) to the database, and will retry up to 10 time(s) in the case of a collision
I0629 10:01:29.655714 OrthancPlugins.cpp:5084] (plugins) Plugin has registered a custom database back-end
I0629 10:01:29.655727 OrthancPluginDatabaseV3.cpp:1071] (plugins) Identifier of this Orthanc server for the global properties of the custom database: "0fd3693e-4c37826a-eba73c52-947cfb70-7862010b"
W0629 10:01:29.655750 main.cpp:1610] Using a custom database from plugins
W0629 10:01:29.655759 OrthancInitialization.cpp:457] Storage directory: "/storage/orthanc_test"
I0629 10:01:29.658468 PluginsManager.cpp:172] (plugins) Successful connection to MySQL database
W0629 10:01:29.668923 HttpClient.cpp:1176] HTTPS will use the CA certificates from this file: config
I0629 10:01:29.668950 HttpClient.cpp:498] (http) Setting the default timeout for HTTP client connections: 0 seconds
I0629 10:01:29.668962 HttpClient.cpp:482] (http) Setting the default proxy for HTTP client connections: 
I0629 10:01:29.668976 DicomAssociationParameters.cpp:375] (dicom) Default timeout for DICOM connections if Orthanc acts as SCU (client): 10 seconds (0 = no timeout)
I0629 10:01:29.669252 ServerIndex.cpp:438] Starting the monitor for stable resources (stable age = 60)
I0629 10:01:29.669332 LuaJobManager.cpp:79] (lua) Lua: DICOM associations will be closed after 5 seconds of inactivity
I0629 10:01:29.669354 LuaScripting.cpp:782] Initializing Lua for the event handler
W0629 10:01:29.669552 LuaContext.cpp:93] Lua says: Lua toolbox installed
I0629 10:01:29.669688 LuaJobManager.cpp:79] (lua) Lua: DICOM associations will be closed after 5 seconds of inactivity
I0629 10:01:29.669698 LuaScripting.cpp:782] Initializing Lua for the event handler
W0629 10:01:29.669845 LuaContext.cpp:93] Lua says: Lua toolbox installed
I0629 10:01:29.669866 ServerContext.cpp:373] Automated transcoding of incoming DICOM instances is disabled
I0629 10:01:29.669873 ServerContext.cpp:380] (dicom) Deidentification of log contents (notably for DIMSE queries) is enabled
I0629 10:01:29.669880 ServerContext.cpp:384] (dicom) Version of DICOM standard used for deidentification is 2021b
I0629 10:01:29.670021 ServerContext.cpp:403] (dicom) Preferred transfer syntax for Orthanc C-STORE SCU: 1.2.840.10008.1.2.1
I0629 10:01:29.670103 DcmtkTranscoder.cpp:75] Quality for lossy transcoding using DCMTK is set to: 90
W0629 10:01:29.670112 ServerContext.cpp:478] Disk compression is disabled
I0629 10:01:29.670118 ServerContext.cpp:1155] Storing MD5 for attachments: yes
W0629 10:01:29.670124 ServerIndex.cpp:391] No limit on the number of stored patients
W0629 10:01:29.670130 ServerIndex.cpp:411] No limit on the size of the storage area
W0629 10:01:29.671839 ServerContext.cpp:220] Reloading the jobs from the last execution of Orthanc
W0629 10:01:29.672032 JobsEngine.cpp:271] The jobs engine has started with 2 threads
I0629 10:01:29.672052 JobsEngine.cpp:125] (jobs) Worker thread 0 has started
I0629 10:01:29.672146 DicomServer.cpp:132] (dicom) Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
I0629 10:01:29.672133 JobsEngine.cpp:125] (jobs) Worker thread 1 has started
I0629 10:01:29.672533 DicomServer.cpp:420] (dicom) Orthanc SCP will *not* use DICOM TLS
W0629 10:01:29.672919 main.cpp:1249] DICOM server listening with AET TEST on port: 5505
I0629 10:01:29.672942 HttpServer.cpp:1579] (http) This Orthanc server uses CivetWeb as its embedded HTTP server
I0629 10:01:29.672951 HttpServer.cpp:2068] (http) The embedded HTTP server will use 50 threads
I0629 10:01:29.672959 HttpServer.cpp:1928] (http) HTTP keep alive is enabled
W0629 10:01:29.672965 HttpServer.cpp:1992] HTTP compression is enabled
I0629 10:01:29.672971 HttpServer.cpp:2081] (http) TCP_NODELAY for the HTTP sockets is set to true
I0629 10:01:29.672973 DicomServer.cpp:63] (dicom) DICOM server started
I0629 10:01:29.672984 HttpServer.cpp:2101] (http) Request timeout in the HTTP server is set to 30 seconds
I0629 10:01:29.673047 HttpServer.cpp:1890] (http) Minimal accepted version of SSL/TLS protocol: TLS1.2
I0629 10:01:29.673054 main.cpp:1077] (http) No configuration option "SslCiphersAccepted", will accept the FIPS 140-2 ciphers
I0629 10:01:29.673066 HttpServer.cpp:1916] (http) List of accepted SSL ciphers: ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:AES256-SHA:AES128-SHA
I0629 10:01:29.673073 main.cpp:1113] Version of Lua: Lua 5.3
W0629 10:01:29.673079 main.cpp:1124] Remote LUA script execution is disabled
I0629 10:01:29.673091 HttpServer.cpp:2148] (http) Branching WebDAV bucket at: /webdav
I0629 10:01:29.673098 HttpServer.cpp:1624] (http) Starting embedded Web server using Civetweb
I0629 10:01:29.678891 OrthancWebDav.cpp:1705] Starting the WebDAV upload thread
W0629 10:01:29.678994 HttpServer.cpp:1769] HTTP server listening on port: 5507 (HTTPS encryption is enabled, remote access is allowed)
W0629 10:01:29.679008 main.cpp:876] Orthanc has started
I0629 10:01:29.679018 LuaScripting.cpp:841] Starting the Lua engine
I0629 10:01:39.589354 HttpServer.cpp:1238] (http) GET /app/explorer.html
I0629 10:01:39.829576 HttpServer.cpp:1238] (http) GET /app/libs/jquery.mobile.min.css
I0629 10:01:39.853487 HttpServer.cpp:1238] (http) GET /app/libs/jquery.mobile.simpledialog.min.css
I0629 10:01:39.854316 HttpServer.cpp:1238] (http) GET /app/libs/jqtree.css
I0629 10:01:39.855540 HttpServer.cpp:1238] (http) GET /app/libs/jquery-file-upload/css/jquery.fileupload-ui.css
I0629 10:01:39.855555 HttpServer.cpp:1238] (http) GET /app/libs/jquery-file-upload/css/style.css
I0629 10:01:39.875313 HttpServer.cpp:1238] (http) GET /app/libs/tree.jquery.js
I0629 10:01:39.875545 HttpServer.cpp:1238] (http) GET /app/libs/date.js
I0629 10:01:39.901304 HttpServer.cpp:1238] (http) GET /app/libs/slimbox2/slimbox2.css
I0629 10:01:39.901348 HttpServer.cpp:1238] (http) GET /app/libs/jquery.min.js
I0629 10:01:39.901394 HttpServer.cpp:1238] (http) GET /app/libs/jquery.mobile.min.js
I0629 10:01:39.901556 HttpServer.cpp:1238] (http) GET /app/libs/jqm.page.params.js
I0629 10:01:39.901908 HttpServer.cpp:1238] (http) GET /app/libs/jquery.mobile.simpledialog2.js
I0629 10:01:39.901908 HttpServer.cpp:1238] (http) GET /app/libs/slimbox2.js
I0629 10:01:39.903493 HttpServer.cpp:1238] (http) GET /app/libs/jquery.blockui.js
I0629 10:01:39.903541 HttpServer.cpp:1238] (http) GET /app/libs/jquery-file-upload/js/vendor/jquery.ui.widget.js
I0629 10:01:39.905188 HttpServer.cpp:1238] (http) GET /app/libs/jquery-file-upload/js/jquery.fileupload.js
I0629 10:01:39.905221 HttpServer.cpp:1238] (http) GET /app/libs/jquery-file-upload/js/jquery.iframe-transport.js
I0629 10:01:39.906207 HttpServer.cpp:1238] (http) GET /app/explorer.css
I0629 10:01:39.906972 HttpServer.cpp:1238] (http) GET /app/file-upload.js
I0629 10:01:39.907799 HttpServer.cpp:1238] (http) GET /app/explorer.js
I0629 10:01:39.908967 HttpServer.cpp:1238] (http) GET /app/query-retrieve.js
I0629 10:01:39.922389 HttpServer.cpp:1238] (http) GET /app/orthanc-logo.png
I0629 10:01:39.929631 HttpServer.cpp:1238] (http) GET /app/libs/images/ajax-loader.gif
I0629 10:01:39.942592 HttpServer.cpp:1238] (http) GET /plugins/explorer.js
I0629 10:01:40.415321 HttpServer.cpp:1238] (http) GET /system
I0629 10:01:40.952713 HttpServer.cpp:1238] (http) GET /app/images/favicon.ico
I0629 10:01:40.952799 SystemToolbox.cpp:819] Unknown MIME type for extension ".ico"
I0629 10:01:40.970537 HttpServer.cpp:1238] (http) GET /app/libs/images/icons-18-white.png
I0629 10:01:43.793600 HttpServer.cpp:1238] (http) GET /system
I0629 10:01:43.816872 HttpServer.cpp:1238] (http) GET /patients
I0629 10:03:58.456767 CommandDispatcher.cpp:332] (dicom) Association Received from AET STORESCU on IP 127.0.0.1
I0629 10:03:58.459829 main.cpp:311] Incoming connection from AET STORESCU on IP 127.0.0.1, calling AET ANY-SCP
I0629 10:03:58.460079 CommandDispatcher.cpp:663] (dicom) Association Acknowledged (Max Send PDV: 16372) to AET STORESCU on IP 127.0.0.1
I0629 10:03:58.501791 main.cpp:344] Incoming Store request from AET STORESCU on IP 127.0.0.1, calling AET ANY-SCP
[...]
I0629 10:04:49.026702 CommandDispatcher.cpp:917] (dicom) Finishing association with AET STORESCU on IP 127.0.0.1: DUL Peer Requested Release
I0629 10:04:49.026716 CommandDispatcher.cpp:925] (dicom) Association Release with AET STORESCU on IP 127.0.0.1
[...]
I0629 10:33:13.148937 HttpServer.cpp:1238] (http) POST /patients/f6be2036-4a9537be-b188f287-8e4f0c3c-812df5b5/anonymize
I0629 10:33:13.568130 JobsRegistry.cpp:701] New job submitted with priority 0: 5d38a5f8-8575-4dd8-ab65-2a2a9943787c
I0629 10:33:13.568219 JobsEngine.cpp:133] (jobs) Executing job with priority 0 in worker thread 0: 5d38a5f8-8575-4dd8-ab65-2a2a9943787c
I0629 10:33:13.568251 ResourceModificationJob.cpp:188] Modifying instance in a job: 29835de8-3e52d92f-81cdbb58-fe77646c-ebbdf2e3
I0629 10:33:13.569699 FilesystemStorage.cpp:160] Reading attachment "66e70eb9-0a5a-40e2-baad-15ce4fcfaf93" of "DICOM" content type
I0629 10:33:13.582005 FilesystemStorage.cpp:124] Creating attachment "f6121c0e-a084-4a72-a1c5-da13e13b6bd9" of "DICOM" type (size: 1MB)
I0629 10:33:13.621140 ServerContext.cpp:624] New instance stored
[...] // 10 seconds after start
I0629 10:33:23.627794 ResourceModificationJob.cpp:188] Modifying instance in a job: 4f029d25-02d41fba-2660b1ca-adc84cde-e51890ed
I0629 10:33:23.628928 FilesystemStorage.cpp:160] Reading attachment "2d3e27d1-0686-46bc-9bf3-cf2a46b2c1a0" of "DICOM" content type
I0629 10:33:23.633806 FilesystemStorage.cpp:124] Creating attachment "7fbca90f-78d8-496e-91c1-275bc1129d9e" of "DICOM" type (size: 1MB)
I0629 10:33:23.653218 ServerContext.cpp:624] New instance stored
E0629 10:33:23.654671 PluginsManager.cpp:164] MySQL error (1406,22001): Data too long for column 'value' at row 1
I0629 10:33:23.654771 PluginsManager.cpp:172] (plugins) An active MySQL transaction was dismissed
I0629 10:33:23.655733 PluginsManager.cpp:172] (plugins) Cannot rollback a non-existing transaction
I0629 10:33:23.655757 ResourceModificationJob.cpp:188] Modifying instance in a job: 7e5b9477-3a831e0d-7035a103-9a35019c-385725c3
I0629 10:33:23.655792 StatelessDatabaseOperations.cpp:554] Cannot rollback transaction: Bad sequence of calls
E0629 10:33:23.656024 ServeqrContext.cpp:268] Cannot serialize the jobs engine: Error with the database engine
I0629 10:33:23.657118 FilesystemStorage.cpp:160] Reading attachment "7737f17d-a14b-40c4-8465-5abd4663045e" of "DICOM" content type
I0629 10:33:23.662869 FilesystemStorage.cpp:124] Creating attachment "586793e1-2d04-48d2-a1ca-62671cbdb45a" of "DICOM" type (size: 1MB)
I0629 10:33:23.680898 ServerContext.cpp:624] New instance stored
I0629 10:33:23.683842 ResourceModificationJob.cpp:188] Modifying instance in a job: 76a10291-9ffafa6a-3b4a561a-e47eb6e5-971cd266
I0629 10:33:23.685047 FilesystemStorage.cpp:160] Reading attachment "2e3a6451-a728-4238-9a37-19c74d2ad908" of "DICOM" content type
I0629 10:33:23.690576 FilesystemStorage.cpp:124] Creating attachment "1d588426-1e1e-4a93-8f19-8d7cf77c0b7d" of "DICOM" type (size: 1MB)
I0629 10:33:23.708522 ServerContext.cpp:624] New instance stored
[...]
I0629 10:33:32.020040 JobsRegistry.cpp:475] Job has completed with success: 5d38a5f8-8575-4dd8-ab65-2a2a9943787c
I0629 10:33:32.048653 HttpServer.cpp:1238] (http) GET /patients/1edad2df-3b0a74a6-be4f2632-66714896-09484a35
I0629 10:33:32.056830 HttpServer.cpp:1238] (http) GET /patients/1edad2df-3b0a74a6-be4f2632-66714896-09484a35/studies
I0629 10:33:32.099327 HttpServer.cpp:1238] (http) GET /patients/1edad2df-3b0a74a6-be4f2632-66714896-09484a35/protected
E0629 10:33:32.100473 PluginsManager.cpp:164] MySQL error (1406,22001): Data too long for column 'value' at row 1
I0629 10:33:32.100530 PluginsManager.cpp:172] (plugins) An active MySQL transaction was dismissed
I0629 10:33:32.101511 PluginsManager.cpp:172] (plugins) Cannot rollback a non-existing transaction
I0629 10:33:32.101555 StatelessDatabaseOperations.cpp:554] Cannot rollback transaction: Bad sequence of calls
E0629 10:33:32.102367 ServerContext.cpp:268] Cannot serialize the jobs engine: Error with the database engine
E0629 10:33:42.124445 PluginsManager.cpp:164] MySQL error (1406,22001): Data too long for column 'value' at row 1
I0629 10:33:42.124535 PluginsManager.cpp:172] (plugins) An active MySQL transaction was dismissed
I0629 10:33:42.126168 PluginsManager.cpp:172] (plugins) Cannot rollback a non-existing transaction
I0629 10:33:42.126270 StatelessDatabaseOperations.cpp:554] Cannot rollback transaction: Bad sequence of calls
E0629 10:33:42.127225 ServerContext.cpp:268] Cannot serialize the jobs engine: Error with the database engine

Sébastien Jodogne

unread,
Jun 29, 2021, 12:20:28 PM6/29/21
to Orthanc Users
Thanks for your instructions: I managed to reproduce your issue thanks to them.

I think I found the culprit code:

The column "value" should be declared "LONGTEXT" in the table "ServerProperties" that was introduced in release 4.0 of the MySQL plugin.

I will soon have a look at the best way to solve this issue while preserving backward compatibility.

Sébastien-

Sébastien Jodogne

unread,
Jun 30, 2021, 4:57:59 AM6/30/21
to Orthanc Users
Hello,

This issue has been fixed by the following changeset:

The just-realesed version 4.1 of the MySQL plugin includes this patch:

Regards,
Sébastien-

Martin Krämer

unread,
Jun 30, 2021, 8:01:21 AM6/30/21
to Orthanc Users
I have tested the new 4.1 version and everything seems to be working now.
Thank you very much!

Best wishes
Martin

Reply all
Reply to author
Forward
0 new messages