Python script Failed to establish a new connection: [Errno 12] Cannot allocate memory error report solution

When writing python scripts, you may encounter the following error when using the requests library for batch login. After investigation, it is found that the memory is not full and there is still enough space in the memory.

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='wjf.cdrcbank.com', port=443): Max retries exceeded with url: /schoolpayment/rdp/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1022ea110>: Failed to establish a new connection: [Errno 12] Cannot allocate memory'))

This problem may be caused by you turning on Proxifier. Just turn off Proxifier. If the Proxifier software is not installed and opened, you can check whether any global proxy tools are enabled.

The author thinks that it may be because the number of threads of Proxifier is limited. During batch login, the connection does not have enough time to close, causing the Proxifier thread to be full. When Python creates a connection to Proxifier, it is rejected. Python mistakenly thinks that it cannot apply for memory, causing this error.

Guess you like

Origin blog.csdn.net/SL003/article/details/134859127