Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

`active_request_count` gauge doesn't decrease on WebSocket disconnect

Abierto
#671 1 comentario 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
scala

Línea de trabajo

Comienza reproduciendo una conexión WebSocket seguida de una desconexión iniciada por el cliente; después, inspecciona el ciclo de vida en SelectorLoop.scala y Http1ServerStage.scala, mencionados en los stack traces. Sigue cómo se actualiza la métrica active_request_count y verifica que disminuya después de la desconexión; comprueba también si las excepciones de shutdown notificadas están relacionadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug module:blaze-server

I just made use of epimetheus-http4s metrics, which look to do almost the same as http4s' metricsOps, and noticed, that active_request_count never goes down for WebSocket connections.

I am using http4s - 0.20.0 and epimetheus-http4s - 0.2.0...

Not sure if it is related, but I get the following exceptions at server shutdown.
If WebSocket connection was opened, then at shutdown time:

2019-05-02 22:10:20,981 ERROR [blaze-selector-1][org.http4s.blaze.channel.nio1.NIO1HeadStage] ip: s: c: p: g: t: - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)

If WebSocket was opened and then closed by client-side, at server shutdown there are:

2019-05-02 22:12:04,365 ERROR [blaze-selector-1][org.http4s.blaze.channel.nio1.NIO1HeadStage] ip: s: c: p: g: t: - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
2019-05-02 22:12:04,365 ERROR [blaze-selector-1][org.http4s.server.blaze.Http1ServerStage$$anon$1] ip: s: c: p: g: t: - Fatal Error: Error in requestLoop()
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
2019-05-02 22:12:04,364 ERROR [blaze-selector-4][org.http4s.blaze.channel.nio1.NIO1HeadStage] ip: s: c: p: g: t: - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
2019-05-02 22:12:04,365 ERROR [blaze-selector-4][org.http4s.server.blaze.Http1ServerStage$$anon$1] ip: s: c: p: g: t: - Fatal Error: Error in requestLoop()
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
2019-05-02 22:12:04,365 ERROR [blaze-selector-1][org.http4s.blaze.channel.nio1.NIO1HeadStage] ip: s: c: p: g: t: - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
2019-05-02 22:12:04,365 ERROR [blaze-selector-4][org.http4s.blaze.channel.nio1.NIO1HeadStage] ip: s: c: p: g: t: - Abnormal NIO1HeadStage termination
java.nio.channels.ShutdownChannelGroupException: null
	at org.http4s.blaze.channel.nio1.SelectorLoop.killSelector(SelectorLoop.scala:225)
	at org.http4s.blaze.channel.nio1.SelectorLoop.org$http4s$blaze$channel$nio1$SelectorLoop$$runLoop(SelectorLoop.scala:185)
	at org.http4s.blaze.channel.nio1.SelectorLoop$$anon$1.run(SelectorLoop.scala:67)
	at java.base/java.lang.Thread.run(Thread.java:835)
Lenguaje dominante
Scala
Estrellas
371
Forks
63
Merge medio
4 h 12 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de http4s/blaze

Todos los issues de http4s/blaze

Issues similares

Más issues de Scala

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.