@sujith I am also seeing these errors since the past week...
(b'\r\n504 Gateway Time-out\r\n\r\n
504 Gateway Time-out
\r\n
nginx
\r\n\r\n\r\n
I am getting this error in Historical API calls... Its really frustrating to see the script go down with one of these errors... and the appropriate time is already passed by the time I realize and restart my script.. I have to change the clock time and rerun the script to not to loose any opportunity.
I am not sure if you have been notified about this problem earlier and if you are doing something about it.... Can you please look into this?
@sujith any idea why this is happening? I see these errors everyday. Today with HDFC. It seems the problem is not with the scrip but with the server because the failure scrips keep on changing...
@sujith 1) No.. this is happening in Historical API call... It is same as the error that started this thread. Basically I don't get any records returned for a 10 min historical API call. I am handling this error so that my script won't break just because I didn't receive records for one scrip. I will paste the exception next time when I catch it.
2) Also I am seeing the below exception time to time (at least couple of times a day) during historical API call. I am not sure how to handle this exception. Can you please throw some light?
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen chunked=chunked) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request self._validate_conn(conn) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn conn.connect() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 289, in connect ssl_version=resolved_ssl_version) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 377, in wrap_socket _context=self) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 752, in __init__ self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 988, in do_handshake self._sslobj.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 633, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 54] Connection reset by peer
@fury1984, We had issues that day and it was fixed. We have reduced timeout on all API calls, you might have encountered the same. The above stacktrace also refers to the same, we will increase the timeout interval.
Is this regarding getQuote API?
Can you let us know for what scrip you tried?
I just checked and it seems to be fine?
(b'\r\n504 Gateway Time-out\r\n\r\n
504 Gateway Time-out
I am getting this error in Historical API calls... Its really frustrating to see the script go down with one of these errors... and the appropriate time is already passed by the time I realize and restart my script.. I have to change the clock time and rerun the script to not to loose any opportunity.
I am not sure if you have been notified about this problem earlier and if you are doing something about it.... Can you please look into this?
i am doing exception handling but it's frightening to see, i guess its not based on script but its based on server.
Is this happening only for getQuote()?
Can you paste exact error code and message?
1) No.. this is happening in Historical API call... It is same as the error that started this thread. Basically I don't get any records returned for a 10 min historical API call. I am handling this error so that my script won't break just because I didn't receive records for one scrip. I will paste the exception next time when I catch it.
2) Also I am seeing the below exception time to time (at least couple of times a day) during historical API call. I am not sure how to handle this exception. Can you please throw some light?
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
chunked=chunked)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
self._validate_conn(conn)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
conn.connect()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/packages/urllib3/util/ssl_.py", line 308, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 377, in wrap_socket
_context=self)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 752, in __init__
self.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 988, in do_handshake
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/ssl.py", line 633, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 54] Connection reset by peer
We tried 10 min data for INFY and couldn't reproduce the issue.
Can you let us know steps to reproduce?
We had issues that day and it was fixed.
We have reduced timeout on all API calls, you might have encountered the same.
The above stacktrace also refers to the same, we will increase the timeout interval.
We took it live yesterday evening, let us know if it happens today.