Skip to content

Commit d21a2f4

Browse files
jan-gKrister Johansen
authored and
Krister Johansen
committed
Revert the runner-side idle timeout to 1s (#1483)
We stumbled over a problem where *some* FDKs are idling their UDS HTTP connections at periods lower than the 120s that this was expecting. This was giving rise to spurious errors (from older versions of the node FDK, for instance) - where invocations beyond the first were seeing 502 gateway errors from a prematurely-closed UDS socket. The notion of an idle timeout here is good, but we should check that all FDKs have the appropriate behaviour and give users time to rev their functions before reintroducing this.
1 parent c995742 commit d21a2f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api/agent/agent.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,8 @@ func newHotContainer(ctx context.Context, evictor Evictor, call *call, cfg *Conf
12071207
MaxIdleConns: 1,
12081208
MaxIdleConnsPerHost: 1,
12091209
MaxResponseHeaderBytes: int64(cfg.MaxHdrResponseSize),
1210-
IdleConnTimeout: 120 * time.Second, // TODO(reed): since we only allow one, and we close them, this is gratuitous?
1210+
IdleConnTimeout: 1 * time.Second, // TODO(jang): revert this to 120s at the point all FDKs are known to be fixed
1211+
// TODO(reed): since we only allow one, and we close them, this is gratuitous?
12111212
DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) {
12121213
var d net.Dialer
12131214
return d.DialContext(ctx, "unix", filepath.Join(iofs.AgentPath(), udsFilename))

0 commit comments

Comments
 (0)