highmed / highmed-dsf

HiGHmed Data Sharing Framework funded by the German Federal Ministry of Education and Research (BMBF, grant ids: 01ZZ1802E and 01ZZ1802A)
Apache License 2.0
32 stars 20 forks source link

Add Config Option for Apache Reverse Proxy Read Timeout #313

Closed hhund closed 2 years ago

hhund commented 2 years ago

The default read timeout of the Apache reverse proxy (how long the reverse proxy waits for an answer from the backend, aka DSF FHIR server) is set to 60 seconds. See ProxyTimeout or rather TimeOut

We should add a config env variable to increase this value and add a note to the DSF BPE config parameter ORG_HIGHMED_DSF_BPE_FHIR_CLIENT_LOCAL_TIMEOUT_READ that the apache reverse proxy timeout needs to be increased to match, if values is larger than 60000.

Current workaround is to extract /usr/local/apache2/conf/extra/host-ssl.conf and override the value via a bind mount, for example (240 seconds): docker-compose.yml:

    volumes:
      - type: bind
        source: ./conf/host-ssl.conf
        target: /usr/local/apache2/conf/extra/host-ssl.conf
        read_only: true

conf/host-ssl.conf:

<Location "/fhir">
        RequestHeader set X-ClientCert %{SSL_CLIENT_CERT}s

        ProxyPass http://${APP_SERVER_IP}:8080/fhir timeout=240
        ProxyPassReverse http://${APP_SERVER_IP}:8080/fhir
</Location>