请问如何解决HTTP 599: Recv failure: Connection reset by peer错误

请问如何解决HTTP 599: Recv failure: Connection reset by peer错误。
页面访问正常。

track.fetch 13824.35ms
    {
      "content": "",
      "encoding": null,
      "error": "HTTP 599: Recv failure: Connection reset by peer",
      "headers": {},
      "ok": false,
      "redirect_url": null,
      "status_code": 599,
      "time": 13.82435154914856
    }
track.process 0.15ms
    HTTP 599: Recv failure: Connection reset by peer
    [E 161205 18:03:46 base_handler:195] HTTP 599: Recv failure: Connection reset by peer
        Traceback (most recent call last):
          File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py", line 188, in run_task
            result = self._run_task(task, response)
          File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py", line 167, in _run_task
            response.raise_for_status()
          File "/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/response.py", line 190, in raise_for_status
            raise http_error
        requests.exceptions.HTTPError: HTTP 599: Recv failure: Connection reset by peer

    {
      "exception": "HTTP 599: Recv failure: Connection reset by peer",
      "follows": 0,
      "logs": "[E 161205 18:03:46 base_handler:195] HTTP 599: Recv failure: Connection reset by peer\n    Traceback (most recent call last):\n      File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py\", line 188, in run_task\n        result = self._run_task(task, response)\n      File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/base_handler.py\", line 167, in _run_task\n        response.raise_for_status()\n      File \"/home/chg/py3env-pyspider/lib/python3.5/site-packages/pyspider/libs/response.py\", line 190, in raise_for_status\n        raise http_error\n    requests.exceptions.HTTPError: HTTP 599: Recv failure: Connection reset by peer\n",
      "ok": false,
      "result": null,
      "time": 0.00014662742614746094
    }

fetch
    {
      "fetch_type": "js"
    }
process
    {
      "callback": "detail_page"
    }
schedule
    {
      "exetime": 1480932256.3733845,
      "itag": "v2",
      "priority": 2,
      "retried": 1
    } 
阅读 6.7k
3 个回答

这个应该是你的HTTP头不对,和网站的对比看看差别吧

JS 我也遇到这样的问题,感觉是phathomjs对有的网站支持并不好。
我遇到有的网站成功率比较高,但是有的就基本没成功的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进