guild icon
Toit
#Issue with HTTP servers freezing (including jag?)
Thread channel in help
addshore
addshore 10/17/2024 08:42 AM
After some time of code running, I end up not being able to use jag to send a new container to my ESP
I just get Error: Get "http://192.168.68.66:9000/identify": context deadline exceeded
Any tips of debugging this further?

I also noticed, that If I am running my own HTTP server on the ESP, this also seems to stop responding.
The flip side of this is that the rest of the code in other tasks in the container continue to run as expected (including sometihng emiting stuff over UDP)
addshoreOPaddshore
After some time of code running, I end up not being able to use jag to send a new container to my ESP I just get `Error: Get "http://192.168.68.66:9000/identify": context deadline ...
floitsch
floitsch 10/17/2024 10:27 AM
One thing to look out for is that the http-server, by default, only accepts a limited amount of connections. Sometimes that stalls/freezes the browser.
Try to increase the --max-tasks of the Server constructor to something higher.
floitsch
floitsch 10/17/2024 10:29 AM
The last commit to the http-package is:
Add '--max-task' to server examples. (#145) Better to expose the argument in examples to make sure users don't forget about it on the host.
floitsch
floitsch 10/17/2024 10:29 AM
The commit message mentions the host, but it might also be needed on the device.
floitsch
floitsch 10/17/2024 10:30 AM
That said. It doesn't explain why the Jaguar server would stop responding.
addshore
addshore 10/17/2024 10:59 AM
Yeah, I tried fiddling with the --max-tasks and didnt appear to be able to make it behave any differently
is max-task per connection then, not per request? Good to know!
Everything felt like it might be further down the stack (due to the apparent lockup of jag on :9000 too
I'll see if I can play around with it a bit more in the coming days or weeks
floitsch
floitsch 10/17/2024 12:30 PM
Maybe @bitphlipphar has an idea of what could be wrong.
addshore
addshore 10/17/2024 01:22 PM
of course it could be a hardware problem again or something :😄:
floitsch
floitsch 10/17/2024 01:41 PM
you never know :🙂:
but definitely hard to debug.
addshore
addshore 10/17/2024 01:51 PM
My favourite :😉:
addshore
addshore 10/17/2024 03:20 PM
I can vaugly replciate similar behaviour with my standard dev board too
My own http servers seems to stop responding, and when trying to do a jag run i get something like
jag --device 192.168.68.77 run ./src/lb.toit Scanning for device with address: '192.168.68.77' Error: Get "http://192.168.68.77:9000/identify": context deadline exceeded
floitsch
floitsch 10/17/2024 03:21 PM
Is there anything on the device-output that indicates a problem there?
addshore
addshore 10/17/2024 04:34 PM
Nope, and the container that I'm running there continue to run as normal
floitsch
floitsch 10/17/2024 04:35 PM
weird.
addshore
addshore 10/17/2024 04:37 PM
I guess I could attach a debugger, but that might have to wait for another week :🤦:
floitsch
floitsch 10/17/2024 04:46 PM
It's a question what goes wrong.
I would probably try to instrument the http package to see if that's where the error is.
👍1
16 messages in total