Comments (4)
As per requests documentation in the module requests.packages.urllib3.connectionpool:
If the pool is already full, the connection is closed and discarded because we exceeded maxsize. If connections are discarded frequently, then maxsize should be increased.
I don't think this is a big problem, but we may need to increase the pool size, so that the connections are not discarded that often.
from threat_intel.
I am receiving the folowing error:
WARNING:urllib3.connectionpool:Connection pool is full, discarding connection: www.virustotal.com
Many times when trying to get a report for ~2000 domains. Has this connection pool issue been resolved?
I get it if I send all 2000 at once or if I iterate over the domains making an API call per domain.
#!/usr/bin/python
import os
import time
from threat_intel.virustotal import VirusTotalApi
vt = VirusTotalApi(os.environ["VIRUS_TOTAL"], resources_per_req=1)
fo = open("questionable_domains.txt", "r")
domains = fo.readlines()
# print(vt.get_domain_reports(domains))
for domain in domains:
print(vt.get_domain_reports(domain))
from threat_intel.
The reason for this issue was that the customized SSL Adapter mounted to each session was using a max HTTPConnectionPool size of 10. Specifically, this meant that each connection pool corresponding to a specific host could only issue 10 requests asynchronously per batch before filling up and discarding the connection. The fix was as simple as specifying for the adapter to take in a maximum pool size corresponding to the max of the grequest
batch size and 10 (default max pool size used by the HTTP adapter).
from threat_intel.
Fixed with #74.
from threat_intel.
Related Issues (20)
- ConnectionError: Request to https://investigate.api.opendns.com/security/name/.hk.json had an empty response HOT 2
- Setup autodeploy to PyPI through Travis HOT 4
- IBM X-Force Exchange integration
- Retry only for the responses that have not finished successfully HOT 1
- "AttributeError: 'NoneType' object has no attribute 'status_code'" in threat_intel/shadowserver.py", line 55, in get_bin_test HOT 1
- Better exception handling in threat_intel.opendns._cached_by_domain wrapper HOT 3
- Limit the number of domains sent to the OpenDNS Investigate API Domain Categorization endpoint in a single POST request HOT 1
- Domain Scores endpoint from OpenDNS Investigate API is deprecated HOT 1
- Merge all responses returned by opendns.categorization() and opendns.domain_score() methods HOT 1
- OpenDNS Investigate Threat Grid integration
- Python 3 Support
- Migrate from grequests to requests-futures for concurrent web requests
- Provide more effective and granular control over retry mechanisms
- Create API module for aggregating Alexa domain rankings
- Include pattern searching functionality for the OpenDNS Umbrella API wrapper
- Incorporate new risk score endpoint to Investigate handler
- Pulsedive API Integration
- Add long_description to setup.py
- Upgrade requests to version 2.20.0 or later (CVE-2018-18074) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from threat_intel.