question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection pool is full, discarding connection

See original GitHub issue

I’m getting a massive amount of these exceptions while trying to retrieve S3 logs, as I’m retrieving each object in separate threads.

WARNING:botocore.vendored.requests.packages.urllib3.connectionpool:Connection pool is full, discarding connection: bucket.s3.amazonaws.com

Should I be closing connections after using them? Or is this in boto’s hands?

thanks

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:6
  • Comments:24 (9 by maintainers)

github_iconTop GitHub Comments

40reactions
JustinTArthurcommented, Feb 8, 2019

This warning is fine. If you dig into the urllib3 connection pool code, it’s basically the pool of persistent connections and not the maximum number of concurrent connections you can have. The connections in the pool are re-used if they haven’t been closed by the endpoint.

If you’d like to boost the size of this pool, it can be done per-endpoint using the low-level botocore config. boto3 example:

import boto3
import botocore

client_config = botocore.config.Config(
    max_pool_connections=25,
)
boto3.client('lambda', config=client_config)

Botocore Config Documentation: https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

18reactions
myselfdesaicommented, Feb 7, 2020

Solution here … use new feature max_pool_connections s3_client = boto3.client('s3', config=botocore.client.Config(max_pool_connections=50))

Read more comments on GitHub >

github_iconTop Results From Across the Web

urllib3 connectionpool - Connection pool is full, discarding ...
The connection is being discarded after the request is completed (because the pool is full, as mentioned). This means that this particular ...
Read more >
How to avoid printing " WARNING - urllib3.connectionpool
connectionpool - Connection pool is full, discarding connection: some-s3-bucket.s3.amazonaws.com". I have tried two ways to avoid the printing.
Read more >
Connection Pool is full - Fritz Router - Configuration
Connection pool is full, discarding connection: 192.168. 178.1. The problem May be the Error is get from the fritzsmarthome integration.
Read more >
AWS Lambda urllib3 connectionpool – Connection pool is full ...
AWS Lambda urllib3 connectionpool – Connection pool is full, discarding connection. Lambda was throwing this error when using thread pool.
Read more >
Connection pool is full' in Docker Compose | DevCoops
Solution 1. Try to recreate the stack and remove any unused networks. · Solution 2. Alternately, increase the limit for the number of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found