1
我已經看到了幾個相關的帖子處理掛起請求使用超時參數,但我不確定如何診斷我的請求是掛起還是存在一些其他潛在問題。我正在傳輸一些數據並將其記錄下來並將其打印到控制檯。有兩次,現在我所看到的擴展在沒有數據打印到控制檯時期,當我interupt執行我得到以下堆棧跟蹤診斷掛起請求與請求
File "/home/matthew/Dropbox/pylibs/oandapy/oandapy.py", line 276, in start
for line in response.iter_lines(90):
File "/home/matthew/anaconda/lib/python2.7/site-packages/requests/models.py", line 663, in iter_lines
for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):
File "/home/matthew/anaconda/lib/python2.7/site-packages/requests/models.py", line 627, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/home/matthew/anaconda/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 240, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/matthew/anaconda/lib/python2.7/site-packages/requests/packages/urllib3/response.py", line 187, in read
data = self._fp.read(amt)
File "/home/matthew/anaconda/lib/python2.7/httplib.py", line 543, in read
return self._read_chunked(amt)
File "/home/matthew/anaconda/lib/python2.7/httplib.py", line 585, in _read_chunked
line = self.fp.readline(_MAXLINE + 1)
File "/home/matthew/anaconda/lib/python2.7/socket.py", line 476, in readline
data = self._sock.recv(self._rbufsize)
File "/home/matthew/anaconda/lib/python2.7/ssl.py", line 246, in recv
return self.read(buflen)
File "/home/matthew/anaconda/lib/python2.7/ssl.py", line 165, in read
return self._sslobj.read(len)
有一些額外的參數,我可以設置或地方登錄與連接的更多信息,從堆棧跟蹤中我不清楚問題是什麼。
你有沒有找到更多關於此? – Halfgaar
從我的回憶中,這個問題是間歇性的,我從來沒有深究到底是什麼導致了它 – mgilbert