504 gateway time-out error
If you are seeing 504 gateway time-out errors when running Transaction List Screening (TLS), your system might be low on resources. Increase your environment resources to resolve this issue.
A 504 error means nginx has waited too long for a response and has timed out. There might be multiple reasons for the problem.
Possible fixes include:
Increasing the
nginx proxy_read_timeout
default of five minutes to be longer, for example, to 10 minutes. The steps to do so are as follows:
Log into the OpenShift UI:
https://<openshift_hostname>:8443
On the right-hand side of the page click the project where FCI Platform Kubernetes was installed.
Click Applications > Pods
Find the FCI Common UI NGINX pod. It will have a name similar to
fci-common-ui-nginx-xxxxxxxxxx-xxxxx
Click on the Terminal tab.
Change to the
locations-files
directory``` cd /etc/nginx/conf.d/location-files ```
Change the
nginx-location-fcai.conf
file from:location /tls/api/v1 { proxy_pass https://fcai-fci-alerts-insight-tls-analytics:3333; client_max_body_size 20m; }
To the following:
location /tls/api/v1 { proxy_pass https://fcai-fci-alerts-insight-tls-analytics:3333; client_max_body_size 20m; proxy_read_timeout 600s; }
This will change the read timeout to ten minutes (600 seconds).
Run the following command to reload your changes:
nginx -s reload
Ensuring all TLS containers and TLS dependent containers are running in a good state. You can determine the state by running the following commands:
oc get pods oc describe pod <pod_name>
Restart containers in a poor or failed state. TLS analytics and Mongo DB containers in a poor or failed state can be a reason for the 504 error.
Reduce the TLS load or increase cluster resources such as CPU, memory, and disk.
Check the TLS analytics container logs for failures and resolve them.