I am using reactjs on frontend and nodejs express in backend, i have established a live connection using socket, For some time when the page mounts connection remains established, even when i emit from the client side(the same page) data are successfully sent and even retrieved the updated datas on client side , but all of a sudden, it throws error something like this :
websocket.js:50 WebSocket connection to 'wss://domain-api-deploy.herokuapp.com/socket.io/?EIO=4&transport=websocket&sid=UNc33egcjyttCADVAC5S' failed: Insufficient resources
and also polling-xhr.js:157 POST https://domain-api-deploy.herokuapp.com/socket.io/?EIO=4&transport=polling&t=NtdZoXk&sid=Rb-5eg-Rl-Z54WQ_AC5U 400 (Bad Request)
and in between these, sometimes again , the connection establishes for a while and again throws the same error mentioned above. Please if you can help me know its cause and the fine solution for it so that my connection establishes without interruption for a long span