[BitBucket user: Alain Mazy]
[BitBucket date: 2017-05-19.15:25:31]
Configuration:
-------------
- Windows 10 64-bit, running on VMware virtual machine
- Orthanc 1.2.0, from OrthancInstaller-Win64-1.2.0.2546.exe, using the default config file(s)
How to reproduce:
----------------
When shutting down or restarting the system, the log file shows the "Orthanc is stopping" message, but does not reach the "Orthanc has stopped".
```
W0519 16:26:05.936933 main.cpp:702] Orthanc is stopping
W0519 16:26:06.015061 main.cpp:762] HTTP server has stopped
W0519 16:26:06.391246 main.cpp:838] DICOM server has stopped
```
For comparison, when manually restarting the service from the Windows Services panel, the log file output is:
```
W0519 16:47:23.673209 main.cpp:702] Orthanc is stopping
W0519 16:47:23.799281 main.cpp:762] HTTP server has stopped
W0519 16:47:23.908824 main.cpp:838] DICOM server has stopped
W0519 16:47:25.019654 PluginsManager.cpp:218] Unregistering plugin 'dicom-web' (version 0.3)
W0519 16:47:25.019654 PluginsManager.cpp:218] Unregistering plugin 'osimis-web-viewer' (version 0.5.4.0-aaa3eeb)
W0519 16:47:25.019654 PluginsManager.cpp:167] Finalizing the Web viewer
W0519 16:47:25.034970 PluginsManager.cpp:218] Unregistering plugin 'postgresql-index' (version 2.0)
W0519 16:47:25.034970 PluginsManager.cpp:167] PostgreSQL index is finalizing
W0519 16:47:25.034970 PluginsManager.cpp:218] Unregistering plugin 'postgresql-storage' (version 2.0)
W0519 16:47:25.034970 PluginsManager.cpp:167] Storage plugin is finalizing
W0519 16:47:25.034970 PluginsManager.cpp:218] Unregistering plugin 'serve-folders' (version 1.2.0)
W0519 16:47:25.034970 PluginsManager.cpp:218] Unregistering plugin 'web-viewer' (version 2.2)
W0519 16:47:25.034970 PluginsManager.cpp:167] Finalizing the Web viewer
W0519 16:47:25.975463 PluginsManager.cpp:218] Unregistering plugin 'worklists' (version 1.2.0)
W0519 16:47:25.975463 PluginsManager.cpp:167] Sample worklist plugin is finalizing
W0519 16:47:25.975463 PluginsManager.cpp:218] Unregistering plugin 'wsi' (version 0.3)
W0519 16:47:25.975463 main.cpp:1297] Orthanc has stopped
```
Additional information:
----------------------
When using the MSSQL index plugin to access a (local or remote) MSSQL database, the same scenario results in a 'database locked' error after restart.
This could, however, also result from the plugin losing access to the database because of the order of shutdown operations.
As a workaround, adding "Lock": false in the plugin configuration solves the 'database locked' error, but not the interrupted service stop issue.
Another workaround has been implemented in the Windows Service to launch Orthanc with --unlock option.
We have tried to increase the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WaitToKillServiceTimeout to 50000ms but this did not help. (http://stackoverflow.com/questions/13454054/what-is-the-maximum-time-windows-service-wait-to-process-stop-request-and-how-to) |