Closed aliindia closed 2 years ago
Hi! Exactly 1 hour sounds like a timeout of something between the client and the server.
In any case, please note that you can't expect that your connection will stay up for an indefinite amount of time.
See also: https://socket.io/docs/v4/troubleshooting-connection-issues/
Hi! Exactly 1 hour sounds like a timeout of something between the client and the server.
In any case, please note that you can't expect that your connection will stay up for an indefinite amount of time.
See also: https://socket.io/docs/v4/troubleshooting-connection-issues/
Can please guide me how to re-connection the closed transport in this case as we are working with ReactJs and user are continue working with current UI will gets message without refeshing their page.
@aliindia there is nothing to do, the client will automatically reconnect (unless you use the option reconnection: false
).
Documentation: https://socket.io/docs/v4/client-initialization/#reconnection
Closed due to inactivity, please reopen if needed.
I have the exact same error and also after 1hour my connexion automatically disconnect
python :
app = Flask(name) app.secret_key = os.urandom(24) app.config['SESSION_PERMANENT'] = True app.config['SESSION_TYPE'] = 'filesystem' app.permanent_session_lifetime = timedelta(days=7) socketio = SocketIO(app, async_mode='eventlet', cors_allowed_origins="*", logger=True, max_http_buffer_size=1e8, engineio_logger=True, ping_timeout=180000, ping_interval=90000, compress=True)
javascript :
socket = io.connect(location.protocol + "//" + document.domain + ":" + location.port, {
query: {
socketId: existingSocketId
},
reconnection: true,
reconnectionAttempts: Infinity,
reconnectionDelay: 5000,
pingInterval: 90000,
pingTimeout: 180000
});
@redouaneboukamir hi! It sounds like something between the client and the server is closing the connection after 1 hour.
That being said, while a bit annoying, it is your duty to handle those temporary disconnections and sync the state of the client upon reconnection.
Yes i thought so, i did all i found to keep up the connection between the server and the client but all i saw on forum, documentation, stackoverflow, i tried and nothing helped. It can be because of my server or something ? because my app is hosted by replit VM
Describe the bug Transport close after 1 hour in socket.io 3.1.2
Socket.IO server version:
3.1.2
Server
Socket.IO client version:
3.1.2
Client
Expected behavior It should not close transport after 1 hour