In order to support the upload of large files, several timeout and limit configurations across multiple components must be adjusted.

Overview

The pre-submit file upload mechanism requires configuring limits and timeouts in three main components: 1. Gentics Mesh 2. Portal 3. Load Balancer / Reverse Proxy (e.g. Nginx)

Without adjusting these settings, uploads of large files may fail due to size restrictions or connection timeouts.

1. Gentics Mesh Configuration

Gentics Mesh caches the uploaded files before they are linked to the final document. The maximum allowed binary upload size is controlled by the following environment variable:

  • MESH_BINARY_UPLOAD_LIMIT: Controls the maximum binary upload size in Gentics Mesh.

ActaNova Plugin Configs

For the file uploads to ActaNova, the following timeout parameters in the ActaNova Mesh Plugin must be configured:

  • MESH_PLUGIN_ACTA_NOVA_AN_FILE_UPLOAD_TIMEOUT: Timeout in seconds for raw binary file uploads to ActaNova. If this is not set, the default HTTP timeout towards ActaNova is used. It must be set high enough to allow uploading large files to ActaNova without timing out.

2. Portal Configuration

The portal handles the HTTP connections for the file upload process. To prevent client connections from timing out when uploading large files, the network timeout must be increased:

  • GPJ_NETWORK_TIMEOUT: Timeout in seconds for HTTP network connections in the portal.

3. Load Balancer / Reverse Proxy (Nginx) Configuration

The load balancer fronting the services must be configured to allow large request bodies and long-lived proxy connections.

For Nginx, the following parameters in the portal virtual host configuration need to be adjusted:

  • client_max_body_size: The maximum allowed size of the client request body. This must match or exceed the maximum expected file upload size.

  • proxy_connect_timeout, proxy_send_timeout, and proxy_read_timeout: The timeouts for establishing a connection, sending data, and reading data from the proxied server.