0

I setup Glassfish 4 websever using websocket.

When I connect to Glassfish through webscoket, I use VisualVM monitor it and see the live threads are increased when Glassfish get new connection. This number is also bigger, sometimes it decrease small amount (mayge GC perform) and turn increase larger amount.

If my server get 1000 new connections over Websocket per minutes and 1000 new live thread appear, so my server will get trouble after 2 hours.

I simulated about 30000 threads to test my server. It's ok. But if over 30000 threads, it will appear errors message: Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread.

JVM options: -Xmx:10240m -Xms:10240m

How to interrupt Glassfish Websocket new live thread to prevent trouble to server?

4

1 回答 1

0

我找到了我的问题的解决方案。只需将 Glassfish 升级到 4.0.1 b3 并使用 Tyrus 1.5 更新。

应该解决有关新活动线程的问题。

于 2014-05-01T06:33:41.310 回答