-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hang during get #11
Comments
I see a similar behavior. On PyPortal running with >100k free memory, I have a wifimanager .get that fails routinely after some time (always seems to be during the 2nd .get in a sequence of 2 - I'm just pulling short pieces of text from an API), requiring manual reload:
If I can get it reproducible with a minimal demo, I'll post that. |
@jerryneedell can you add a timeout? errors are fine - ESP32 sometimes goes off into a bad zone - but it should raise an error rather than hangning |
I'll take a look at it -- timeout sounds like a good idea. |
Still looking into just where this is hanging and where a timeout should be added. It takes a long time to reproduce ;-) |
Only within the past week I've been getting hangs sometimes overnight on PyPortal (since updating to 4.0.0-beta6 or -beta7). esp.firmware_version reports 1.2.2 (NINA_W102_17_FEB_2018.bin I believe?) The following is after a run with 1,020 successful GETs (HTTP OK code 200), 8 408s (server timed out waiting for client - I've gotten some 408s regardless of version), and sporadic retries:
I'll try to capture with debug enabled, and see if I can isolate anything. |
the thing i dont get is that we have a timeout in taht code
which makes me wonder if eventually |
Done: debug=3 & I'm saving a large scrollback. I don't have the output anymore on the original hang, but if I recall correctly the raw time.montonic was approx. 40,000+ seconds, and the program run time was approx. 20,000+ seconds. (The PyPortal code does also occasionally restart itself when I'm not looking, but I assume that's unrelated.) |
Oddly, now I'm routinely getting memory errors I haven't seen before (no other code changes, other than debug): ADDENDUM: Ignore this comment for now, doing more testing. esp._debug=3 seems to trigger a lot of HTTP 408 errors (presumably slowing down the client). That and/or serial may be factors in the memory issue. Trying esp._debug=2, looking better so far. ADDENDUM 2: Ran for days w/o incident, likely a fluke that it happened a couple of times close together. I have identical code now running on PyPortal, Feather M4, and ItsyBitsy M4, so will keep an eye out. |
I fixed it hanging on my end by adding the timeout in It appeared to hang in the After adding a max tries to that while loop, and throwing an exception after that threshold my PyPortal now seems to run perfectly. |
@ZachNo more timeouts are better, if you have a PR for a timeout addition please submit! |
Was #44 suppose to fix this? Looks like there is some history here. I've only just recently run into this. It appears that only fixed |
I've been running with the PR44 version of the lib and it seems to have fixed this. @jerryneedell Have you had a chance to test as well? |
@caternuson maybe we should do a release? a couple of these were fixed |
I did try #44 and had no problems with it. |
@ladyada yep, i'd say so. |
@caternuson Yes, I think so. If it recurs we can always file a new issue. |
cool. thanks. or reopen this one, closing for now. |
Not much to go on, but I wanted to document this as well as I can:
I was running the cheerlights demo overnight. In the morning I noticed it was not updating and appeared to just be hung. I entered control-C ather REPL and this is the traceback:
It appears to have been stuck in _waot_response_cmd()
That's all the information I have at this point.
The text was updated successfully, but these errors were encountered: