Wednesday, 12 April 2017

Page refresh issue

So I have a website running two websockets written in nodejs utilizing socket.io, one for live updating an iframe source, and one for a live chat. The backend is laravel 5.3 and page is static besides the two iframes. If I restart the servers, or they crash, the iframes refresh but the entire page itself does not.

However, there seems to be some error where the page randomly refreshes, the entire page as if you hit f5. The servers are fine and not crashing, and there's nothing in place for that to happen. This happens randomly, and only to certain users, and their locations are not close. I'm at a complete loss. It's not an exact time frame, the nodejs servers report they disconnect, and it happens randomly, if at all.

I'm behind cloudflare, and I'm wondering if either some combination of nginx/ufw is limiting connection rates and disconnecting them, but which shouldn't force the page to reload entirely, only the iframes utilizing the websocket to reconnect. If I haven't setup nginx to restore original ips is it possible ufw/iptables is blocking cloudflare origin connections temporarily causing these issues? I've been on cloudflare for nearly a year and this just starting happening now. Even if, that would only cause the websocket to disconnect and not the entire page to refresh.

If it was a php error, shouldn't it happen to everyone? Since I can't easily duplicate it, it's hard to check for errors, chrome console log/network for ws report no issues I can see. I'm just really at a loss here and looking for some type of lead or "start here" advice.



via Steve Gabbino

No comments:

Post a Comment