Hi @srikanth …! This could be due to the default “web transport inactive timeout” value of 30 seconds set by the client profile. I noticed this when using MQTT over WebSockets in a JavaScript app, and if I navigated away from the Chrome tab where the app was running for a while… Chrome kind of puts the tab to sleep, and my WS connection would drop out.
If you modify the client profile and put the web inactive timeout to 75 seconds, that might help… it fixed my issue. Chrome seems to let the app do its thing every 60 seconds, so I stopped getting timeouts.
Also, to help verify this, you could check the broker’s event.log
and look for the CLIENT_CLIENT_DISCONNECT
log corresponding to your WS client, and see if the disconnect reason was listed as “keep-alive” or similar.
Note: if you’re using Solace Cloud for your broker service, and it’s not a recent broker version (10.9+), you can’t edit the client profile directly via the PubSub+ Manager… you need to do it in the Solace Cloud “mission control” console… inside your broker’s service, click on the “Manage” tab, and Client Profiles is in the top-right.