{"record":{"id":"c899b8986856c14f","repo":"valyala/fasthttp","slug":"fasthttp-connection-pool-strategy-is-not-implemen","errorCode":null,"errorMessage":"fasthttp: connection pool strategy is not implement","messagePattern":"fasthttp: connection pool strategy is not implement","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client.go","lineNumber":1801,"sourceCode":"\t// to the given host.\n\t//\n\t// Increase the allowed number of connections per host if you\n\t// see this error.\n\tErrNoFreeConns = errors.New(\"fasthttp: no free connections available to host\")\n\n\t// ErrConnectionClosed may be returned from client methods if the server\n\t// closes connection before returning the first response byte.\n\t//\n\t// If you see this error, then either fix the server by returning\n\t// 'Connection: close' response header before closing the connection\n\t// or add 'Connection: close' request header before sending requests\n\t// to broken server.\n\tErrConnectionClosed = errors.New(\"fasthttp: the server closed connection before returning the first response byte. \" +\n\t\t\"make sure the server returns 'connection: close' response header before closing the connection\")\n\n\t// ErrConnPoolStrategyNotImpl is returned when HostClient.ConnPoolStrategy is not implement yet.\n\t// If you see this error, then you need to check your HostClient configuration.\n\tErrConnPoolStrategyNotImpl = errors.New(\"fasthttp: connection pool strategy is not implement\")\n)\n\ntype timeoutError struct{}\n\nfunc (e *timeoutError) Error() string {\n\treturn \"fasthttp: timeout\"\n}\n\n// Timeout implements the Timeout behavior of the net.Error interface.\n// This allows for checks like:\n//\n//\tif x, ok := err.(interface{ Timeout() bool }); ok && x.Timeout() {\nfunc (e *timeoutError) Timeout() bool {\n\treturn true\n}\n\n// ErrTimeout is returned from timed out calls.\nvar ErrTimeout = &timeoutError{}","sourceCodeStart":1783,"sourceCodeEnd":1819,"githubUrl":"https://github.com/valyala/fasthttp/blob/c96f600972c6f4a7a30d664257b340ebe9d60124/client.go#L1783-L1819","documentation":"ErrConnPoolStrategyNotImpl is returned when HostClient.ConnPoolStrategy is set to a value fasthttp does not implement yet. The client detects the unknown strategy when establishing a connection and refuses to proceed.","triggerScenarios":"Setting HostClient.ConnPoolStrategy to an unsupported or unrecognized value (typo, a strategy constant from a newer fasthttp version than the one compiled in, or an invalid numeric value).","commonSituations":"Copy-pasted client config referencing a strategy from a different library version; upgrading fasthttp source while a vendored older version is actually built.","solutions":["Set ConnPoolStrategy to a supported exported constant available in your fasthttp version","Run go mod tidy / go get -u github.com/valyala/fasthttp to align the compiled version with the strategy you use","Remove the ConnPoolStrategy field to fall back to default pool behavior","Check go.mod/vendor for the fasthttp version actually in use"],"exampleFix":"// before\nc := &fasthttp.HostClient{ConnPoolStrategy: 99} // unknown strategy\n// after\nc := &fasthttp.HostClient{\n    Addr: \"example.com:80\",\n    ConnPoolStrategy: fasthttp.ConnPoolStrategyDefault,\n}","handlingStrategy":"validation","validationCode":"switch hc.ConnPoolStrategy {\ncase fasthttp.ConnPoolStrategyDefault: // plus any supported constants in your version\n    // ok\ndefault:\n    if hc.ConnPoolStrategy != 0 {\n        return errors.New(\"unknown ConnPoolStrategy\")\n    }\n}","typeGuard":null,"tryCatchPattern":"if errors.Is(err, fasthttp.ErrConnPoolStrategyNotImpl) {\n    // fall back to a client with default pool settings\n}","preventionTips":["Only assign exported ConnPoolStrategy constants","Pin and align your fasthttp version with the constants you use","Validate client config at startup with a test request","Check release notes when upgrading fasthttp"],"tags":["configuration","connection-pool","client"],"backgroundTag":"unsupported-conn-pool-strategy","analyzedSha":"c96f600972c6f4a7a30d664257b340ebe9d60124","analyzedAt":"2026-08-31T22:48:28.265Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}