Orthanc upload freezes

Hi,

I am using Orthanc inside a docker container on my PC, together with Keycloak and auth service.

If I try to load more than one folder simultaneously, sometimes it freezes as in the picture:

The progress pointed by the red arrow is stuck and If I refresh the page, the DICOM series are not completed loaded. As you can see I don’t have any errors in console neither in the Orthanc log. My Orthanc version is 25.4.2.

These are my configuration files:

Orthanc.json

{

  "Name": "Orthanc Server",

  "StorageDirectory": "/var/lib/orthanc/db",

  "IndexDirectory": "/var/lib/orthanc/db",

  "RemoteAccessAllowed": true,

  "OverwriteInstances": true,

  "Plugins": [

    "/run/orthanc/plugins",

    "/usr/share/orthanc/plugins"

  ],

  "Gdcm": {

    "Throttling": 4,

    "RestrictTransferSyntaxes": [

      "1.2.840.10008.1.2.4.90",

      "1.2.840.10008.1.2.4.91",

      "1.2.840.10008.1.2.4.92",

      "1.2.840.10008.1.2.4.93"

    ]

  },

  "RestApiWriteToFileSystemEnabled": false,

  "DicomServerEnabled" : false

}

Orthanc-auth-plugins.json:

{
  "AuthenticationEnabled": false,
  "OrthancExplorer2": {
    "Enable": true,
    "IsDefaultOrthancUI": true,
    "UiOptions": {
      "EnableOpenInOhifViewer3": true,
      "EnableDeleteResources": true,
      "EnableAnonymization": false,
      "EnableModification": false,
      "EnableLinkToLegacyUi": false,
      "EnableEditLabels": false,
      "EnableLabelsCount": false
    },
    "Keycloak": {
      "Enable": true,
      "Realm": "orthanc",
      "ClientId": "orthanc"
    }
  },
  "DicomWeb": {
    "Enable": true,
    "PublicRoot": "/dicom-web/"
  },
  "OHIF": {
    "DataSource": "dicom-web",
    "RouterBasename": "/ohif/"
  },
  "Indexer": {
    "Enable": true,
    "Folders": [
      "/var/lib/orthanc/filesystem"
    ],
    "Interval": 10
  },
  "Authorization": {
    "StandardConfigurations": [
      "orthanc-explorer-2",
      "ohif"
    ],
    "TokenHttpHeaders": [
      "api-key"
    ],
    "CheckedLevel": "studies"
  },
  "PythonPluginsEnabled": true,
  "PythonScript": "/etc/orthanc/instance-label.py"
}

Overwritten by the docker compose parameters:

environment:
      # General configuration
      NO_JOBS: "true"
      VERBOSE_STARTUP: "true"
      VERBOSE_ENABLED: "true"
      TRACE_ENABLED: "true"

      # Orthanc server name
      ORTHANC__NAME: "My Orthanc 01"

      # DICOMweb plugin configuration
      DICOM_WEB_PLUGIN_ENABLED: "true"
      ORTHANC__DICOM_WEB__PUBLIC_ROOT: "/orthanc-01/dicom-web/"

      # OHIF Viewer plugin configuration
      OHIF_PLUGIN_ENABLED: "true"
      ORTHANC__OHIF: |
        {
          "RouterBasename": "/orthanc-01/ohif/",
          "DataSource" : "dicom-web"
        }
      
      # Explorer2 plugin configuration
      ORTHANC__ORTHANC_EXPLORER_2__KEYCLOAK__URL: "https://localhost/keycloak/"
      #ORTHANC__ORTHANC_EXPLORER_2__KEYCLOAK__URL: "http://localhost/keycloak/"
      ORTHANC__ORTHANC_EXPLORER_2__KEYCLOAK__REALM: "orthanc"
      ORTHANC__ORTHANC_EXPLORER_2__KEYCLOAK__CLIENT_ID: "orthanc"
      ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__OHIF_VIEWER_3_PUBLIC_ROOT: "https://localhost/orthanc-01/ohif/"
      #ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__OHIF_VIEWER_3_PUBLIC_ROOT: "http://localhost/orthanc-01/ohif/"
      ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__ENABLE_DELETE_RESOURCES: "true"
      ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__ENABLE_CHANGE_PASSWORD: "false"
      ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__ENABLE_EDIT_LABELS: "true"

      # Authorization configuration
      ORTHANC__AUTHORIZATION__WEB_SERVICE_ROOT_URL: "http://orthanc-auth-service:8000/"
      ORTHANC__AUTHORIZATION__WEB_SERVICE_USERNAME: "share-user"
      ORTHANC__AUTHORIZATION__WEB_SERVICE_PASSWORD: "change-me"
      ORTHANC__AUTHORIZATION__WEB_SERVICE_IDENTIFIER: "orthanc-01"

Any suggestion? Is there something that can interrupt the upload?
Thank you,
Lorenzo

I have this problem when our site is proxied by Cloudflare, they have max upload size limitation for free websites, definitely worth a check there.

If you have other reverse proxy such as nginx, check options such as:

And see if it needs to be increased.

Meanwhile, a timeout and a 413 content too large is different, if you can capture the response from networks panel in developer tools it will help identify the issue.

Hi,
now I’m using a basic Orthanc setup with PostgreSQL (running on Windows via Docker Desktop).
Here is the configuration I’m using:

services:
  orthanc-pg:
      image: orthancteam/orthanc:25.12.0
      depends_on: [orthanc-index]
      restart: unless-stopped
      ports: ["4244:4242", "8044:8042"]
      volumes: 
        - ./orthanc-storage-for-pg:/orthanc-storage-for-pg/
      environment:
        VERBOSE_STARTUP: "true"
        VERBOSE_ENABLED: "true"
        ORTHANC_JSON: |
          {
            "Name": "Orthanc PG",
            "AuthenticationEnabled": false,
            "IndexDirectory": "/var/lib/orthanc/db/",
            "StorageDirectory": "/orthanc-storage-for-pg/",
            "OrthancExplorer2": {
              "Enable": true,
              "IsDefaultOrthancUI": true,
              "UiOptions": {
                "EnableOpenInOhifViewer3": true,
                "EnableDeleteResources": true,
                "EnableAnonymization": false,
                "EnableModification": false,
                "EnableLinkToLegacyUi": false,
                "EnableEditLabels": true,
                "EnableLabelsCount": false
              }
            },
            "DicomWeb" : {
              "Enable" : true
            },
            "PostgreSQL": {
              "Host": "orthanc-index"
            },
            "AdvancedStorage": {
              "Enable": true,
              "NamingScheme": "dicom/{PatientID}_{StudyInstanceUID}/{SeriesInstanceUID}/{UUID}{.ext}"
            }
          }
        
        DICOM_WEB_PLUGIN_ENABLED: "true"
        ORTHANC__DICOM_WEB__PUBLIC_ROOT: "/dicom-web/"
        OHIF_PLUGIN_ENABLED: "true"
        ORTHANC__OHIF: |
          {
            "RouterBasename": "/ohif/",
            "DataSource" : "dicom-web"
          }
        ORTHANC__ORTHANC_EXPLORER_2__UI_OPTIONS__OHIF_VIEWER_3_PUBLIC_ROOT: "http://localhost:8044/ohif/"

        ORTHANC__ADVANCED_STORAGE__INDEXER__THROTTLE_DELAY_MS: 1

  orthanc-index:
      image: postgres:15
      restart: unless-stopped
      ports: ["5432:5432"]
      volumes: ["orthanc-pg-index:/var/lib/postgresql/data"]
      environment:
        POSTGRES_HOST_AUTH_METHOD: "trust"


volumes:
  orthanc-pg-index:

If I upload a folder using the GUI button, and while the first upload is still in progress I start uploading a second folder, the second upload systematically hangs once the first one completes.
I don’t see any errors in the browser console or network tab, nor any errors in the Orthanc logs.
Has anyone observed this behavior before? It’s quite frustrating.
Please, can someone try my configuration and tell me if you have the same behavior?

Thanks,
Lorenzo

Yes, no problems here.

Hi Alain,
that’s very strange. I tested with Microsoft Edge and Google Chrome and I experience the same behavior, while with Mozilla Firefox I don’t have any freezes.
If I use the drag-and-drop feature, I don’t have any problems.
Could you try clicking on the “Select folder” button to select the folder through the Windows File Explorer? In that case, the application freezes on the second upload, when the first upload finishes.
Same behavior for “Select files” button.
What kind of information should I send you? I checked the console and the network tab in both browsers and I don’t see any errors. The same applies to the Orthanc logs.

Thanks a lot,
Lorenzo