Windows server runs out of memory when querying PACS

Issue #1003 resolved
David Platten created an issue

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)

  1. David Platten reporter

    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>>

  2. Log in to comment