Webapp fix the network timeout on API - frontend

How to fix the api network timeout at client side? how to debug and resolve that
I am looking for client side(browserO side tracer to figure it out how the network timeout is happening at client side

Related

javax.net.ssl.SSLException: Connection reset exception when connecting DocuSign development endpoint

javax.net.ssl.SSLException: Connection reset
I'm trying to connect Docusign's development endpoint (account-d.docusign.com) through my application. We are experiencing "javax.net.ssl.SSLException: Connection reset" when the application tries to retrieve a JWT user token using "requestJWTUserToken" method. What might be causing the SSL exception? Thanks for any help!
It seems that the connection has been closed by the server end of the connection. This could be an issue with the request you are sending
To aid debugging you could look at using a tool such as Wireshark to view the actual network packets.
The cause could be that the connection inside HttpClient is stale. Check stale connection for SSL does not fix this error. Solution: dump your client and recreate.

socket.io client can't upgrade from XHR long polling to websocket

We have a server which do implement socket.io in NodeJS on Heroku.
We have a bunch of clients (Raspberry pi's) destributed on different networks across our country. They do implement socket.io clients in a NodeJS application.
It do work very well on 17/18 devices. We do have one device which are not able to upgrade the socket.io connection from a long-polling type to an actual websocket.
I cannot find the reason why.
Our server is setup with the following options:
Server settings
This is what the logs on our heroku server tells about the connection with the problematic client:
Heroku logs
As all clients are setup exactly the same way, i do not actually suspect any problems on the raspberries themselves.
Could it be a network problem where this one client is located?
- Behind the router, blocking some port etc?
Hope you have some suggestions to what the problem could be.
You tell if you need anymore information.

Noode.js ws: Server doesn't know that the client is disconnected

We have a problem in our project using the node ws websockets library.
When the client looses network connection the only way to know that the client is disconnected is by sending a ws.ping() from the server. This is too resource consuming for us.
Does anybody know if there is a default way to get the ws server to use TCP level keepalives instead of using the ping/pong functionality?
Solved this by letting the client send a response when a message is received.

Deploying a socket.io app in on multiple-nodes

I have an app on heroku that uses socket.io for server-client communication. Everything is working just fine. However, once I scale my app to more than 1 dyno, I get several http request errors:
can't establish a connection to the server at wss://***/socket.io/?EIO=2&transport=websocket&sid=Hky6IHdckNADdU_tAACm. socket.io.js:4520
The connection to wss://***/socket.io/?EIO=2&transport=websocket&sid=Hky6IHdckNADdU_tAACm was interrupted while the page was loading. socket.io.js:4520
can't establish a connection to the server at wss://***/socket.io/?EIO=2&transport=websocket&sid=kWymv6ItJHBcUybZAAAA. socket.io.js:4520
The connection to wss://***/socket.io/?EIO=2&transport=websocket&sid=kWymv6ItJHBcUybZAAAA was interrupted while the page was loading. socket.io.js:4520
As well as a load of
HTTP status 400
{ code: 1, message: "Session ID unknown" }
My socket.io is using the redis adapter, so the state should be shared correctly. I kind of verified this by connecting to redis and issuing the following command:
PSUBSCRIBE socket.io#*
Since I can see data traveling back and force on this channel, I am assuming my socket.io redis adapter is working fine.
Anyone know how to make socket.io work on heroku with more than 1 dyno?
You need sticky load balancing. Socket.io has a great article on it, so I'll leave it to them to explain the topic:
https://socket.io/docs/using-multiple-nodes/

Browser, behind Squid, can't establish connection to socket.io websockets transport

My problem is simple to explain but not so simple to fix I think since I haven't found a solution yet.
I'm developing an API. The backend is developed using NodeJs and Socket.Io. Everything works perfect but the issue arises when I'm on a net that's behind a firewall, Squid in this case. It is the browser who is behind the firewall not the server (NodeJs).
The thing is that I get this error:
WebSocket connection to 'ws://mydomain.com/socket.io/1/websocket/vN8hWt_EjV0Z5P5-GwrW' failed: Unexpected response code: 502 (socket.io.js:2)
and I don't know how to the browser can skip Squid.

Resources