Open NickWaterton opened 5 years ago
I'm fairly sure this https://github.com/urllib3/urllib3/issues/1516 is the issue.
I have implemented a workaround by adding , timeout=5.0
to each of your api requests.get
calls, and trapping the timeout in my code. This seem to work for now.
Thanks nick I will get this fixed on the server side as well.
@NickWaterton I've made some further API changes today. Can you let me know if you're still seeing this issue?
Ed,
Are these changes to the API, or the server? The server is the current issue. Using the 5 second timeout and my retry mechanism, I see the error every 5 minutes or so, which is a lot less than it used to be. Sometimes it can go 20 minutes or more with no error.
Nick Waterton P.Eng. National Support Leader - Nuclear Medicine, PET and RP GE Healthcare
M+1 416 859 8545 E nick.waterton@med.ge.commailto:nick.waterton@med.ge.com
2300 Meadowvale Boulevard Mississauga, ON L5N 5P9 Canada
GE imagination at work
From: Edward Paget notifications@github.com Sent: Tuesday, March 26, 2019 3:51 PM To: flair-systems/flair-api-client-py flair-api-client-py@noreply.github.com Cc: Waterton, Nick (GE Healthcare) Nick.Waterton@med.ge.com; Mention mention@noreply.github.com Subject: EXT: Re: [flair-systems/flair-api-client-py] API Keeps failing to retrieve data (#2)
@NickWatertonhttps://github.com/NickWaterton I've made some further API changes today. Can you let me know if you're still seeing this issue?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flair-systems/flair-api-client-py/issues/2#issuecomment-476866917, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALCUZxNySmEdYm2p0nfcIMEc2WIClZNbks5vapYzgaJpZM4b9HiS.
Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-desabonnement
I made changes to our servers that I was hoping would resolve the issue. Are you seeing your 5 second timeout expiring every 20 minutes or so? Or are you seeing the truncated API responses? I think the current setup you could occasionally see longer than 5s response times, but they should still complete.
I’m seeing the 5 second timeout every 5-20 minutes. This is improved over what it was.
I can send you my logs when I get home, flight gets in tonight.
Nick Waterton P.Eng Sent from my iPhone
On Mar 28, 2019, at 6:39 AM, Edward Paget notifications@github.com<mailto:notifications@github.com> wrote:
I made changes to our servers that I was hoping would resolve the issue. Are you seeing your 5 second timeout expiring every 20 minutes or so? Or are you seeing the truncated API responses? I think the current setup you could occasionally see longer than 5s response times, but they should still complete.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flair-systems/flair-api-client-py/issues/2#issuecomment-477577737, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALCUZ9lBfGwQLBp6f6Yrtp8RJfCvYeLwks5vbLgLgaJpZM4b9HiS.
Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-desabonnement
Here is my log, if you search for “Error”, you can see how frequently I have to retry the query due to timeouts.
5.0 secs was just a guess, although why a server would take longer than a few fractions of a second to process the request I don’t know.
Nick Waterton P.Eng. National Support Leader - Nuclear Medicine, PET and RP GE Healthcare
M+1 416 859 8545 E nick.waterton@med.ge.commailto:nick.waterton@med.ge.com
2300 Meadowvale Boulevard Mississauga, ON L5N 5P9 Canada
GE imagination at work
From: Edward Paget notifications@github.com Sent: Wednesday, March 27, 2019 7:55 PM To: flair-systems/flair-api-client-py flair-api-client-py@noreply.github.com Cc: Waterton, Nick (GE Healthcare) Nick.Waterton@med.ge.com; Mention mention@noreply.github.com Subject: EXT: Re: [flair-systems/flair-api-client-py] API Keeps failing to retrieve data (#2)
I made changes to our servers that I was hoping would resolve the issue. Are you seeing your 5 second timeout expiring every 20 minutes or so? Or are you seeing the truncated API responses? I think the current setup you could occasionally see longer than 5s response times, but they should still complete.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flair-systems/flair-api-client-py/issues/2#issuecomment-477413481, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALCUZ3Kfphe_sTecQfeye-esmw_Kemusks5vbCD_gaJpZM4b9HiS.
Unsubscribe from GE's commercial electronic messages: http://sc.ge.com/*casl-unsubscribe Désabonner des messages électroniques commerciaux de GE: http://sc.ge.com/*lcap-desabonnement
This is the error that I have been getting recently:
Sometimes i only get one or two readings before the error.
Note: There is a long pause (like a timeout) between the last reading and the error. Normally the readings come in one after another, and the cycle is repeated every minute.
For completeness, this is what you get under python 3.6:
My source code is here https://github.com/NickWaterton/Flair-Vents-MQTT-Interface