Skip to content

Commit 27c4423

Browse files
Reconfigure timeout in envd (#616)
Co-authored-by: Jakub Novák <jakub@e2b.dev>
1 parent bd0ed28 commit 27c4423

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

packages/envd/main.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ import (
2323
)
2424

2525
const (
26-
// We limit the timeout more in proxies.
27-
maxTimeout = 24 * time.Hour
28-
maxAge = 2 * time.Hour
26+
// Greater than in orchestrator proxy.
27+
idleTimeout = 640 * time.Second
28+
maxAge = 2 * time.Hour
2929

3030
defaultPort = 49983
3131
)
@@ -155,11 +155,11 @@ func main() {
155155
middleware.Wrap(handler),
156156
),
157157
),
158-
Addr: fmt.Sprintf("0.0.0.0:%d", port),
159-
ReadHeaderTimeout: 5 * time.Second,
160-
ReadTimeout: maxTimeout,
161-
WriteTimeout: maxTimeout,
162-
IdleTimeout: maxTimeout,
158+
Addr: fmt.Sprintf("0.0.0.0:%d", port),
159+
// We remove the timeouts as the connection is terminated by closing of the sandbox and keepalive close.
160+
ReadTimeout: 0,
161+
WriteTimeout: 0,
162+
IdleTimeout: idleTimeout,
163163
}
164164

165165
if startCmdFlag != "" {

0 commit comments

Comments
 (0)