Skip to content

Commit b286a05

Browse files
feat(fastly): Allow adjust max_conn (#448)
* feat(fastly): Allow adjust max_conn We are seeing Fastly errors with `max_conn`, need to be able to adjust this for high throughput services. ```bash HTTP/2 503 content-type: text/html; charset=utf-8 via: 1.1 varnish, 1.1 varnish accept-ranges: bytes retry-after: 0 server: Varnish date: Wed, 18 Mar 2026 13:52:35 GMT x-served-by: cache-bfi-kbfi7400023-BFI, cache-bfi-kbfi7400023-BFI x-cache: MISS, MISS x-cache-hits: 0, 0 x-timer: S1773841955.060108,VS0,VE26 content-length: 470 <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>503 Backend.max_conn reached</title> </head> <body> <h1>Error 503 Backend.max_conn reached</h1> <p>Backend.max_conn reached</p> <h3>Error 54113</h3> <p>Details: cache-bfi-kbfi7400023-BFI 1773841955 1100143237</p> <hr> <p>Varnish cache server</p> </body> </html> ``` (cherry picked from commit 077be02) * fix: Set default keepalive to Fastly default of 300
1 parent f7cfb26 commit b286a05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

google_fastly_waf/main.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ resource "fastly_service_vcl" "default" {
6363

6464
connect_timeout = lookup(backend.value, "connect_timeout", 10000)
6565
first_byte_timeout = lookup(backend.value, "first_byte_timeout", 60000)
66-
keepalive_time = lookup(backend.value, "keepalive_time", 5)
66+
keepalive_time = lookup(backend.value, "keepalive_time", 300)
6767
override_host = lookup(backend.value, "override_host", "")
6868
port = lookup(backend.value, "port", 443)
6969
request_condition = lookup(backend.value, "request_condition", "False")
7070
shield = lookup(backend.value, "shield", "")
7171
ssl_sni_hostname = lookup(backend.value, "ssl_sni_hostname", "")
7272
use_ssl = lookup(backend.value, "use_ssl", false)
73+
max_conn = lookup(backend.value, "max_conn", 200) # set to default
7374

7475
# health check is a string, created in another block
7576
healthcheck = lookup(backend.value, "health_check_name", "")

0 commit comments

Comments
 (0)