• Read: Maximum duration for reading the entire request, including the body.
    • Write: The maximum duration before timing out writes of the response.
    • Idle: The maximum time to wait for the next request (when using keep-alive). Default is 5 minutes.

    Timeouts are an important way to maintain server connectivity in the face of buggy or malicious clients.

    Because timeouts apply to an entire HTTP server which may serve multiple sites defined in your Caddyfile, the timeout values for each site will be reduced to their minimum values (with 0 or none being the lowest) across all sites that share that server. It’s a good idea to keep your timeouts the same or just set them on one site to avoid confusion. A timeout set on one site will apply to all sites that share that server.

    To set all the timeouts to the same value:

    You can also configure each timeout individually:

    timeouts { read *val* header *val* write *val* idle *val* }

    Valid values are durations, or or none to disable the timeout if it was previously enabled.

    Set custom read timeout and write timeouts:

    timeouts { read 30s write 20s }

    to use Caddy with your business and for basic email support, along with other benefits!