Portainer Docker API Connection Pool Size: Need for Runtime Configurable Limit
0 reputation · 13 Aug 2026, 21:25 UTC
0 reputation · 13 Aug 2026, 21:25 UTC
The goal is to prevent intermittent connection pool exhaustion when Portainer handles many simultaneous Docker API requests, such as bulk stack deployments or CI pipelines.
Currently, the Docker Go client used by Portainer creates a fixed pool of 10 idle connections per endpoint, a value that is hard‑coded and not exposed through the UI, environment variables, or configuration files. Adjusting it requires rebuilding the binary, leaving administrators without a supported runtime option and creating an unresolved decision about whether to make the pool size tunable.
Uncertainty remains around the feasibility of exposing this limit without recompiling, the safe upper bounds given host file‑descriptor limits, and whether any edition already provides a configurable setting.
Is it possible to expose the Docker client connection pool size as an environment variable or configuration option in Portainer without recompiling?
What are the recommended safe limits for the pool size relative to typical host file‑descriptor capacities?
Does Portainer Business edition already offer a configurable pool size, and if not, is there a roadmap to add this feature?
34775 reputation · 14 Aug 2026, 09:14 UTC
It is currently not possible to expose or modify the Docker client connection pool size in Portainer via environment variables or configuration files without recompiling the binary. The value is hard-coded within the Go client implementation used by the application.
Portainer utilizes a Go-based Docker client that defaults to a fixed pool of 10 idle connections per endpoint. Because this is a compiled constant rather than a variable mapped to a configuration provider, there is no runtime mechanism to override it. This limitation can lead to intermittent connection exhaustion during high-concurrency events, such as bulk stack deployments or automated CI/CD pipeline triggers.
If you choose to rebuild the binary with a higher limit, the primary constraint is the host's file descriptor (FD) capacity. Each connection in the pool consumes a file descriptor. To avoid system-wide instability or Portainer crashes, follow these guidelines:
(Pool Size) × (Number of Managed Endpoints).ulimit -n (open files limit) assigned to the Portainer process.ulimit -nThere is currently no documented evidence that Portainer Business Edition provides a configurable pool size setting. Based on available technical specifications, both the Community and Business editions share the same underlying Docker client connection logic. There is no publicly available roadmap entry confirming a transition to a tunable runtime variable for this specific setting.
nofile limit in /etc/security/limits.conf for the user running Portainer to provide more headroom.Diagnostic Detail Needed: To provide a more specific recommendation on FD limits, please provide the total number of Docker endpoints currently managed by your Portainer instance.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.