Windows server runs out of memory when querying PACS
My test system runs out of system memory, causing PostgreSQL to fail, when querying PACS for radiographic or mammographic images. This is related to how the extractor is run in the openrem_orthanc_config_windows.lua
file:
Replacing this line:
os.execute('start /b ' .. python_executable .. ' ' .. python_scripts_path .. import_script .. ' ' .. temp_file_path)
With this line:
os.execute(python_executable .. ' ' .. python_scripts_path .. import_script .. ' ' .. temp_file_path)
Fixes the issue for me in the following section of openrem_orthanc_config_windows.lua
:
-- Call OpenREM import script. Runs as orthanc user in linux, so log files must be writable by Orthanc
-- Run in detached mode, so long imports don't lead to network problems
if (use_postgres) then
if (use_windows_execute) then
os.execute('start /b ' .. python_executable .. ' ' .. python_scripts_path .. import_script .. ' ' .. temp_file_path)
else
os.execute(python_executable .. ' ' .. python_scripts_path .. import_script .. ' ' .. temp_file_path .. ' &')
end
else
os.execute(python_executable .. ' ' .. python_scripts_path .. import_script .. ' ' .. temp_file_path)
end
The above section can be simplified, and the comment changed, because this file only applies to Windows.
Comments (3)
-
reporter -
reporter Updated changes file only [skip ci]. Refs issue
#1003→ <<cset 85b0913b893d>>
-
reporter - changed status to resolved
Merged in issue1003windowsServerRunsOutOfMemoryWhenQueryingPACS (pull request #593)
Issue1003windowsServerRunsOutOfMemoryWhenQueryingPACS
Approved-by: Ed McDonagh
Fixes issue
#1003→ <<cset 76561c1ba440>>
- Log in to comment
Removed 'start /b' when running the import script from Orthanc Lua file on Windows. Replaced a couple of tabs with spaces in the same file, and corrected indentation. Refs issue
#1003→ <<cset 6b9639ef4a5f>>