您的位置:首页 > 理论基础 > 计算机网络

HTTPSConnectionPool(host='xxxxx', port=443): Max retries exceeded with url:xxxxxxxx (Caused by NewConnectionError('<urllib3.connect,Max retries exceeded with ,(Caused by NewConnectionError

2017-04-27 15:12 701 查看
HTTPSConnectionPool(host='f6ws-sha8re-o88k.s3.ama66zaws.com', port=443): Max retries exceeded with url: /uploads/website/auctions/items/full/3076380_1.jpg
(Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000000003C5F3C8>:
Failed to establish a new connection: [Errno 10060] ',))


  http连接太多没有关闭导致的

  1、增加重试连接次数

    requests.adapters.DEFAULT_RETRIES = 5

  2、关闭多余的连接

    s = requests.session()

    s.keep_alive = False

  3、升级requests

    pip install --upgrade requests

  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: