On Wed, Jul 11, 2018 at 10:41 AM Giacomo Arru - BETA Technologies
<giac...@beta.srl> wrote:

> I tried to enable debug logging for org.apache.tomcat.websocket but
> without success
>
> here is my logging.properties
>
>
>
> handlers = java.util.logging.ConsoleHandler
>
> .handlers = 1catalina.org.apache.juli.AsyncFileHandler,
> java.util.logging.ConsoleHandler
>
> java.util.logging.ConsoleHandler.level = ALL
> java.util.logging.ConsoleHandler.formatter =
> org.apache.juli.OneLineFormatter
>
> org.apache.coyote.http2.level = ALL
> org.apache.tomcat.websocket.level = ALL
> org.apache.coyote.http11.Http11AprProtocol = ALL
>
>
>
>
>
> Giacomo
>
>
>
>
>
> Da: "Mark Thomas" <ma...@apache.org>
> A: "users" <users@tomcat.apache.org>
> Inviato: Martedì, 10 luglio 2018 23:27:09
> Oggetto: nginx + Tomcat 9
>
> On 10/07/18 17:59, Giacomo Arru - BETA Technologies wrote:
> > Hi,
> > we are using nginx as proxy for our web app deployed in Tomcat 9.
> >
> > The app uses websocket. The websocket connection dies after 30/40
> seconds and we can't figure out why.
> >
> > Any suggestions?
>
> Turn on debug logging for the org.apache.tomcat.websocket package
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>
> --
> Questo messaggio stato analizzato con Libra ESVA ed risultato non infetto.
> Seguire il link qui sotto per segnalarlo come spam:
>


I had a similar problem. I could resolved it by sending a keep alive
message from the browser.
If you still get disconnections (backend or middlerware could disconnect),
you need some logic in the frontend to restart the connection.
I didn't have to change any tomcat configuration, or the websocket code.

You can test connecting direct to tomcat websocket (without nginx) to check
where is the problem.
You can also read these nginx configs:
proxy_connect_timeout
proxy_read_timeout

Hope it helps,


"No olvides, no traiciones, lo que llevas bien dentro de ti. No olvides, no
traiciones, lo que siempre te ha hecho vivir."

Reply via email to