Environment
This article applies for all Domino platform versions
Issue
Default read/send request timeouts in nginx are set to 300 seconds. In some cases we might need a larger timeout period for our App operations (for example uploading/downloading large files) .
Resolution
To achieve this we will have to edit the ConfigMap for the kubernetes pod which is running our App.
First you will need to start the App so you can get the ID from the App versions view URL
Example:
https://<DOMINO_URL>/<USERNAME>/<PROJECT>/publishApp?appId=<APPID>#appversions
We can use the appid to identify the pod which is running our Application:
[user@host ~]$ kubectl get pod -A | grep <APP_ID> --color
domino-compute run-<APP_ID> 4/4 Running 0 2d
Once the pod has been identified we then proceed with editing the ConfigMap so we can change the
timeout to the desired length.
[user@host ~]$ kubectl edit cm -n domino-compute run-<APP_ID>
configmap/run-<APP_ID> edited
The specific nginx configuration we are looking for is proxy_read_timeout for uploading and proxy_send_timeout in the case of downloading . Once you are presented with the text editor you can change those values to what suits your use case . When finished used ":wq" to save the changes and exit the editor.
http{ ... proxy_read_timeout 300; proxy_send_timeout 300; ... }
The changed variables do not take effect after saving the files. For this to happen we will have to restart the App.
[user@host ~]$ kubectl delete pod -n domino-compute run-<APP_ID>
pod "run-<APP_ID>" deleted
Now kubernetes will restart and re-deploy the app taking in to account the updated ConfigMap. We can monitor the status with the following commands.
[user@host ~]$ kubectl get pod -A | grep <APP_ID>
domino-compute run-<APP_ID> 2/2 Running 0 1m10s
Once we have the pod in "Running" state with the correct number of containers our app will be back online and ready for use .
Note: In later versions of Domino Platform (>=4.6) we have introduced Central Config parameters to
tackle this issue. To configure the connect timeout for Nginx proxy server running in the “run” pod you can use:
“com.cerebro.domino.computegrid.kubernetes.apps.nginx.readTimeout” “com.cerebro.domino.computegrid.kubernetes.apps.nginx.connectTimeout”
To configure these keys, use “finite duration” syntax for time, e.g. 30s for 30 seconds, 5m for 5 minutes, 1h for 1 hour. If the keys are not configured then they default to 300 seconds. By default, the keys are not configured.
Comments
0 comments
Please sign in to leave a comment.