Hello!
My web socket server application with MySQL database connection pooling, seems that something needs about garbage collection (or there is a memory leak???).
The Java Visual VM shows the following data:
Morning (1):
Evening (2):
Night (3):
Pressing the Perform (full) GC button, the night's data are (4):
Stopping and starting the server application after (4):
I'm starting the server with:
Note that after restarting, the live threads became ~226 instead of ~510.
All database connections are closed after using them.
The most "useless" threads seems that are websocket connections!
My server is a HP proliant with 4core XEON and 16GB RAM, with Ubuntu Linux OS.
Do you think that something goes wrong?
Thank you in advance!
My web socket server application with MySQL database connection pooling, seems that something needs about garbage collection (or there is a memory leak???).
The Java Visual VM shows the following data:
Morning (1):
B4X:
Live Threads: ~1120
Used Heap: ~850MB before GC, ~140MB after GC
Total Started Threads: ~1700
Evening (2):
B4X:
Live Threads: ~980
Used Heap: ~1.1GB before GC, ~210MB after GC
Total Started Threads: ~2300
Night (3):
B4X:
Live Threads: ~510
Used Heap: ~1.3GB before GC, ~250MB after GC
Total Started Threads: ~2900
Pressing the Perform (full) GC button, the night's data are (4):
B4X:
Live Threads: ~510
Used Heap: ~230MB
Total Started Threads: ~2900
Stopping and starting the server application after (4):
B4X:
Live Threads: ~226
Used Heap: ~880MB before GC, ~47MB after GC
Total Started Threads: ~247
I'm starting the server with:
B4X:
java -Xms2G -Xmx5G -XX:MaxPermSize=256m -XX:NewRatio=1 -XX:+UseConcMarkSweepGC -verbosegc -jar MyServer.jar
Note that after restarting, the live threads became ~226 instead of ~510.
All database connections are closed after using them.
The most "useless" threads seems that are websocket connections!
My server is a HP proliant with 4core XEON and 16GB RAM, with Ubuntu Linux OS.
Do you think that something goes wrong?
Thank you in advance!
Last edited: