kea-anterius
kea-anterius copied to clipboard
Error 1: Error: Status Code : 408 after a few minutes
I start the application normally with "npm start" on the server.
Then I load the main page in the browser (x.x.x.x: 3000) After I pushed the browser window into the background and waited a few minutes I always get the following error on the server:
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (1)
[WS] STATUS: Socket clients (0)
[WS] STATUS: Socket clients (0)
[WS] STATUS: Socket clients (0)
[WS] STATUS: Socket clients (0)
[WS] STATUS: Socket clients (0)
[WS] STATUS: Socket clients (0)
Error 1: Error: Status Code : 408
at ClientRequest.
After that I can not reload the page on the browser and I have to restart the application server side.
What can I do to work around this problem?
Hi @dawys, thank you for raising this concern. Yes, there is a stability issue with the nodejs server and the application crashes when the server is idle for extended periods of time. Still working on identifying and fixing the cause for the same, will post as soon as I have an update.
Hi Anthrino, i think the problem could be that http does not support promise
https://www.valentinog.com/blog/http-requests-node-js-async-await/
My thought was wrong. I replaced the http libary with the axios libary but the error 408 was thrown in the same way.
After 2 days of testing, I found out what was convenient. I have revised the WebSocket handling. How can I send you the changes?
Hi @dawys, that's great you can push your code into a branch and create a pull request, I can test it out and apply the patch if the bug is resolved, appreciate your efforts. 👍 @tomaszmrugalski kindly grant @dawys write access to the repository to submit the changes, thanks.
How can I send you the changes?
Usually, the best way is to send PR. See https://help.github.com/articles/creating-a-pull-request/
This is much better than simply commiting to a branch in this repo. PR can be reviewed, commented on and updated if nedeed before they're merged.
I have created a pull request:
https://github.com/isc-projects/kea-anterius/pull/32