Use the requests library to request url, this error will occur, the reason is:
The server is overloaded, and no more links can be established. There are 4 possibilities:
- Too many http connections are not closed.
- The machine’s memory is insufficient.
- Another possibility is that the IP is blocked by the target website due to the high request frequency
- The requested URL address is wrong
Solution:
1. increase the number of retry connections
requests.adapters.DEFAULT_RETRIES = 5
2. close redundant connections
requests uses the urllib3 library, the default http connection is keep-alive, requests set False to close.
Operation method:
s = requests.session()
s.keep_alive = False
Read More:
- urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘localhost‘, port=8097): Max retries excee
- [Solved] Python requests ConnectionError Error: connection aborted BadStatusLine
- Python + Requests +Excel+Jenkins interface automation
- [Solved] Python Requests Error: simplejson.errors.JSONDecodeError: Expecting value
- Python requests Error: ConnectionError: (‘Connection aborted.‘, error(104, ‘Connection reset by peer‘))
- Using postman Test Django Interface error: RuntimeError:You called this URL via POST,but the URL doesn‘t end in a slash
- Using Python error urlopen error unknown URL type: the solution of HTTPS
- Failed to establish a new connection: [winerror 10048] in the requests thread pool, the interface is called circularly to get the datagram error
- [Solved] ModuleNotFoundError: No module named ‘requests‘
- [Solved] Pychar error: modulenotfounderror: no module named ‘requests_ HTML ‘solution
- ModuleNotFoundError: No module named ‘requests‘ [How to Solve]
- [Solved] RecursionError: maximum recursion depth exceeded in comparison
- [Solved] Request.url is not modifiable, use Request.replace() instead
- [Solved] Jupyter runs error: IOPub data rate exceeded
- [Solved] NPM install Error: check python checking for Python executable python2 in the PATH
- [Solved] Np.argwhere error: maximum recursion depth exceeded while calling
- Invalid python sd, Fatal Python error: init_fs_encoding: failed to get the Python cod [How to Solve]
- How to Solve Python WARNING: Ignoring invalid distribution -ip (e:\python\python_dowmload\lib\site-packages)
- [Solved] HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/saved_model
- [Solved] opencv-python: recipe for target ‘modules/python3/CMakeFiles/opencv_python3.dir/all‘ failed