Disposing of Anonymous Domain Connections

Is there a programmatic way to dispose of anonymous domain connections that were left opened because the user closes the browser. I tried to call dispose on onbeforeload event but it seems that some are still not getting disposed. Ideally l’d like an API call to use to get all domain connections and then close ones that are too old.

Jared,

Can you mention which version of Convergence you are using? Theoretically, connections of a disconnected client, whether cleanly disconnected or if they just disappear uncleanly, should be cleaned up by the sever. Our web socket protocol includes a heartbeat function which periodically pings the client. If the client does not respond the connection should be terminated and the session along with it.

It was the case in a previous version that the session clean up was not happening. Theoretically, we have fixed that in a recent release.

Thank you for getting back to me. What you say makes sense. I was worried that having too many anonymous connections opened was causing the system to lock up after a week or two in usage. I am using the convergencelabs/convergence-server:1.0.0-rc.8 docker image in a kubernetes environment.

Roger. We have made a few releases since 1.0.0-rc.8 that have a lot of stability improvements. The specific problem you are seeing was fixed (I believe) in 1.0.0-rc.9

I might suggest upgrading to the latest and seeing if it fixes the issue.

I have upgraded to the latest (1.0.0-rc.12)and unfortunately something messed up the database I think. I am getting this error from the clusterserver:

com.convergencelabs.convergence.server.backend.db.UpgradeException: A state persistence error occurred: The schema is not installed at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$upgradeConvergenceDatabaseIfNeeded$2(ConvergenceDatabaseInitializer.scala:464) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at scala.util.Either.fold(Either.scala:190) ~[org.scala-lang.scala-library-2.13.5.jar:?] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$upgradeConvergenceDatabaseIfNeeded$1(ConvergenceDatabaseInitializer.scala:466) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at scala.util.Success.flatMap(Try.scala:258) ~[org.scala-lang.scala-library-2.13.5.jar:?] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.upgradeConvergenceDatabaseIfNeeded(ConvergenceDatabaseInitializer.scala:452) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$processExistingSchema$1(ConvergenceDatabaseInitializer.scala:80) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at scala.util.Success.flatMap(Try.scala:258) ~[org.scala-lang.scala-library-2.13.5.jar:?] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.processExistingSchema(ConvergenceDatabaseInitializer.scala:79) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$assertInitialized$3(ConvergenceDatabaseInitializer.scala:69) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$assertInitialized$3$adapted(ConvergenceDatabaseInitializer.scala:68) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at scala.util.Success.flatMap(Try.scala:258) ~[org.scala-lang.scala-library-2.13.5.jar:?] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.$anonfun$assertInitialized$2(ConvergenceDatabaseInitializer.scala:68) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at scala.util.Success.flatMap(Try.scala:258) ~[org.scala-lang.scala-library-2.13.5.jar:?] at com.convergencelabs.convergence.server.backend.db.ConvergenceDatabaseInitializer.assertInitialized(ConvergenceDatabaseInitializer.scala:67) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at com.convergencelabs.convergence.server.backend.services.server.ConvergenceDatabaseInitializerActor$.$anonfun$apply$3(ConvergenceDatabaseInitializerActor.scala:51) ~[com.convergencelabs.convergence-server-1.0.0-rc.12.jar:1.0.0-rc.12] at akka.actor.typed.internal.BehaviorImpl$ReceiveMessageBehavior.receive(BehaviorImpl.scala:153) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpret(Behavior.scala:274) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:230) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl$$anon$2.apply(InterceptorImpl.scala:57) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.RestartSupervisor.aroundReceive(Supervision.scala:267) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl.receive(InterceptorImpl.scala:85) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpret(Behavior.scala:274) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:230) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl$$anon$2.apply(InterceptorImpl.scala:57) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl.receive(InterceptorImpl.scala:87) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpret(Behavior.scala:274) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:230) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl$$anon$2.apply(InterceptorImpl.scala:57) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.SimpleSupervisor.aroundReceive(Supervision.scala:123) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.InterceptorImpl.receive(InterceptorImpl.scala:85) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpret(Behavior.scala:274) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.Behavior$.interpretMessage(Behavior.scala:230) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.adapter.ActorAdapter.handleMessage(ActorAdapter.scala:131) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.typed.internal.adapter.ActorAdapter.aroundReceive(ActorAdapter.scala:107) ~[com.typesafe.akka.akka-actor-typed_2.13-2.6.15.jar:2.6.15] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) ~[com.typesafe.akka.akka-actor_2.13-2.6.15.jar:2.6.15] at akka.actor.ActorCell.invoke(ActorCell.scala:548) ~[com.typesafe.akka.akka-actor_2.13-2.6.15.jar:2.6.15] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) ~[com.typesafe.akka.akka-actor_2.13-2.6.15.jar:2.6.15] at akka.dispatch.Mailbox.run(Mailbox.scala:231) ~[com.typesafe.akka.akka-actor_2.13-2.6.15.jar:2.6.15] at akka.dispatch.Mailbox.exec(Mailbox.scala:243) ~[com.typesafe.akka.akka-actor_2.13-2.6.15.jar:2.6.15] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) [?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) [?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) [?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) [?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) [?:?]

Have you logged in to the admin console and completed the database upgrade after upgrading the container?

No I did not do that. I was not able to log into the admin console after upgrading to rc.12 since it was giving me the bind() to 0.0.0.0:80 failed (13: Permission denied) error. I tried changing the HTTP_PORT setting to no avail per what you suggested before. BTW, thank you for all your quick responses. I really appreciate it!

I believe it as to do with this change https://github.com/convergencelabs/convergence-project/issues/252. I just moved down to version 11 until I can figure out how to change the port.

Can you show me the docker command you were running when trying to change the port? I can try to replicate the issue.