-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rising memory problem and OutOfMemory [Scala] #794
Comments
While testing with the demo application in the repository, I noticed, when I convert the application to the Scala and constantly refresh the page to connect/dissconnect in the browser, the heap size rises very fast and it is never released. Scala version. package com.wstest
import com.corundumstudio.socketio.{AckRequest, Configuration, SocketIOClient, SocketIOServer}
import com.corundumstudio.socketio.listener.DataListener
import com.wstest.Main.chats
object ScalaLauncher {
@throws[InterruptedException]
def main(args: Array[String]): Unit = {
val config = new Configuration
config.setHostname("localhost")
config.setPort(9092)
val server = new SocketIOServer(config)
server.addEventListener("chatevent", classOf[String], new DataListener[String]() {
override def onData(client: SocketIOClient, data: String, ackRequest: AckRequest): Unit = { // broadcast messages to all clients
server.getBroadcastOperations.sendEvent("chatevent", data)
}
})
server.start()
} |
I solved with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I use netty-socketio 1.7.18 in my Scala application, but after a while it shutdowns the application with an out of memory error. In production the virtual memory goes up to 130g. Memory raises up faster(~100mb) when the page refreshes by the browser(client).
I manual call GC but it doesn't release.
When looking from the VisualVM, it seems that the reason are netty buffers. You can see it from screenshots.
I still haven't found a solution, can you help me please?
The text was updated successfully, but these errors were encountered: