Skip to content

Request Timeouts#

amazee.io sets timeouts for HTTP request in several places to ensure the stability and security of the platform.

Server Side Timeouts#

Servers may set a timeout for how long it is willing to wait for a server request to finish processing, or how long it is willing to wait for a client to finish a request.

A typical request may look like the following, where a user's browser makes a request to the CDN, which makes a request to the cluster ingress, which finally makes a request to an application service.

graph LR
  A[User] ---> B[CDN];
  B --> C[Cluster Ingress];
  C --> D[Service];

Each part of this request chain can have it's own timeout.

CDN Timeout#

The default timeout is 90 seconds. To increase this value, you will need to contact support.

If the CDN times out, the user may be shown an HTTP 503 error page.

Error 503 first byte timeout Varnish cache server

Cluster Ingress Timeout#

The default timeout is 60 seconds. To increase this value, add the nginx.ingress.kubernetes.io/proxy-read-timeout ingress annotation to the appropriate route in your .lagoon.yml.

If the cluster ingress times out, the user may be shown an HTTP 504 error page.

504 Gateway Time-out nginx

Service Timeout#

The timeout in an application service is configured entirely by the container. When using Lagoon base images, a default timeout may be set, check the documentation for your specific application.

For example, the Lagoon PHP base image has a default max_execution_time = 900 and it can be changed by setting the environment variable PHP_MAX_EXECUTION_TIME.

Example error if the PHP service timed out:

NOTICE: PHP message: PHP Fatal error: Maximum execution time of 900 seconds exceeded

If a timeout occurs at the CDN or cluster ingress first, the application server may log an HTTP 499 error. For example, nginx would log:

xxx.xxx.xxx.xxx - lagoon [01/Jan/2025:00:00:00 +0000] "GET / HTTP/1.1" 499 0 "-" "curl/8.5.0" "xxx.xxx.xxx.xxx"

Client Side Timeouts#

Browsers and code libraries may also configure a timeout of how long it is willing to wait for a server to respond.

These timeouts are not managed or changeable by amazee.io infrastructure.