router disconnects

#1

We have problem of session that disconnects unexpectedly.
This happens when a client tries to publish large number (~100) of consecutive messages to different topics.

After about 50 messages, the session disconnects.

:On router we see

dropping connection to peer with abort=True: WebSocket ping timeout (peer did not respond with pong in time)

On client we see than ping messages are received and pong replies are sent every second (as expected) and then stop. After few second the client disconnected and immediately reconnects successfully.

0 Likes

#2

Hi Arie,

We have problem of session that disconnects unexpectedly.
This happens when a client tries to publish large number (~100) of
consecutive messages to different topics.
After about 50 messages, the session disconnects.

If you publish in a tight loop in a run-time that is based on a single threaded event loop (eg Twisted), then this will block the event loop / reactor, and there is no chance for the library to answer the ping request coming from the router.

Either yield every eg every 20 iterations of your publishing loop, or increase the pong timeout on Crossbar.io ..

Cheers,
/Tobias

···

Am 23.11.2017 um 17:13 schrieb Arie Keren:

  :On router we see
dropping connection to peer with abort=True: WebSocket ping timeout (peer
did not respond with pong in time)

On client we see than ping messages are received and pong replies are sent
every second (as expected) and then stop. After few second the client
disconnected and immediately reconnects successfully.

0 Likes

#3

My client is Spring service with Jawampa client library.
In netty logs I see that client sends pong for each ping received from router and then it suddenly stops receiving ping from router.
I also see than pong are sent within 1-2msec from ping.

So it looks that client behaves correctly

בתאריך יום חמישי, 23 בנובמבר 2017 בשעה 18:13:57 UTC+2, מאת Arie Keren:

···

We have problem of session that disconnects unexpectedly.
This happens when a client tries to publish large number (~100) of consecutive messages to different topics.

After about 50 messages, the session disconnects.

:On router we see

dropping connection to peer with abort=True: WebSocket ping timeout (peer did not respond with pong in time)

On client we see than ping messages are received and pong replies are sent every second (as expected) and then stop. After few second the client disconnected and immediately reconnects successfully.

0 Likes

#4

My client is Spring service with Jawampa client library.
In netty logs I see that client sends pong for each ping received from
router and then it suddenly stops receiving ping from router.
I also see than pong are sent within 1-2msec from ping.
So it looks that client behaves correctly

Could you send the log output of Crossbar.io when that happens?

Start Crossbar.io with a log level debug:

crossbar start --loglevel=debug

···

Am 23.11.2017 um 23:00 schrieb Arie Keren:

בתאריך יום חמישי, 23 בנובמבר 2017 בשעה 18:13:57 UTC+2, מאת Arie Keren:

We have problem of session that disconnects unexpectedly.
This happens when a client tries to publish large number (~100) of
consecutive messages to different topics.
After about 50 messages, the session disconnects.

  :On router we see
dropping connection to peer with abort=True: WebSocket ping timeout (peer
did not respond with pong in time)

On client we see than ping messages are received and pong replies are sent
every second (as expected) and then stop. After few second the client
disconnected and immediately reconnects successfully.

0 Likes

#5

You were right - the problem was with client’s threading model. Publish handlers were executed on netty thread, blocking processing of new messages.
After moving handlers to another executor ( {subscribeOn(Schedulers.from(executor)} ) - the problem resolved.

בתאריך יום שישי, 24 בנובמבר 2017 בשעה 11:40:46 UTC+2, מאת Tobias Oberstein:

···

Am 23.11.2017 um 23:00 schrieb Arie Keren:

My client is Spring service with Jawampa client library.

In netty logs I see that client sends pong for each ping received from

router and then it suddenly stops receiving ping from router.

I also see than pong are sent within 1-2msec from ping.

So it looks that client behaves correctly

Could you send the log output of Crossbar.io when that happens?

Start Crossbar.io with a log level debug:

crossbar start --loglevel=debug

בתאריך יום חמישי, 23 בנובמבר 2017 בשעה 18:13:57 UTC+2, מאת Arie Keren:

We have problem of session that disconnects unexpectedly.

This happens when a client tries to publish large number (~100) of

consecutive messages to different topics.

After about 50 messages, the session disconnects.

:On router we see

dropping connection to peer with abort=True: WebSocket ping timeout (peer

did not respond with pong in time)

On client we see than ping messages are received and pong replies are sent

every second (as expected) and then stop. After few second the client

disconnected and immediately reconnects successfully.

0 Likes