So, I'm using a forever-frame to stream data from Tornado to a JavaScript client application, and I'm finding that the JavaScript client occasional just stops receiving data. I've implemented a heartbeat method, where the client will change the URL of the frame to reopen the connection when a heartbeat is missed, but this feels like an awkward hack--- and there's a certain amount of setup and teardown which has to happen in the app UI when the connection refreshes. I'd really prefer if it could be one persistent connection for the entire session of use.
Sometimes this is once every few minutes, other times it seems to get itself in a loop where it happens every five seconds. My browsers are Firefox and Chrome.
What kinds of things could cause this issue? I really just need some ideas for starting points in my debugging--- should I be looking at latency, data flooding, bad connection? Would the problem be more likely to be at the Tornado end or the JavaScript end? Alternatively, would I be better to invest my efforts in making the JavaScript app able to reinitialize itself more gracefully?