vfafou Well-Known Member Licensed User Longtime User Apr 30, 2015 #1 Hello! Is there any way to detect memory leaks? How can I force release - dispose - destroy of a thread? Is it possible runtime errors to leave bad data in memory? Could Try-Catch-End Try block help to avoid such situations? Thank you in advance!
Hello! Is there any way to detect memory leaks? How can I force release - dispose - destroy of a thread? Is it possible runtime errors to leave bad data in memory? Could Try-Catch-End Try block help to avoid such situations? Thank you in advance!
Erel B4X founder Staff member Licensed User Longtime User Apr 30, 2015 #2 Did you encounter an out of memory error? Upvote 0
vfafou Well-Known Member Licensed User Longtime User Apr 30, 2015 #3 Erel said: Did you encounter an out of memory error? Click to expand... No, but when custom Web socket framework is working some hours, it causes sudden client disconnections, uses more memory with the same number of clients and finally is getting heavy loaded and unresponsive. Somewhere in the code I have added, I might have caused a memory leak, but I can't detect where it is. Upvote 0
Erel said: Did you encounter an out of memory error? Click to expand... No, but when custom Web socket framework is working some hours, it causes sudden client disconnections, uses more memory with the same number of clients and finally is getting heavy loaded and unresponsive. Somewhere in the code I have added, I might have caused a memory leak, but I can't detect where it is.
Erel B4X founder Staff member Licensed User Longtime User Apr 30, 2015 #4 You can use a tool such as VisualVm to find memory leaks: https://visualvm.java.net/ Memory leaks should eventually lead to an out of memory error. Upvote 0
You can use a tool such as VisualVm to find memory leaks: https://visualvm.java.net/ Memory leaks should eventually lead to an out of memory error.
vfafou Well-Known Member Licensed User Longtime User May 2, 2015 #5 Hi! I've found that setMaxIdleTime value of database connection pool, was accidentally set at 0. I've set it at 1200 and I've given setUnreturnedConnectionTimeout a value of 120 seconds. The server is up and running for 38 hours without any problem. The only thing I've noticed, is that JVM creates many threads (~430) where most of them are totally unused! Is it a normal state? BTW, I tried B4J beta! All I've done by now, seems stable. The most amazing I've used is the Dark Theme! It's my favorite generally to all IDE's I use! @Erel: Keep up the amazing work! Congrats!!! Upvote 0
Hi! I've found that setMaxIdleTime value of database connection pool, was accidentally set at 0. I've set it at 1200 and I've given setUnreturnedConnectionTimeout a value of 120 seconds. The server is up and running for 38 hours without any problem. The only thing I've noticed, is that JVM creates many threads (~430) where most of them are totally unused! Is it a normal state? BTW, I tried B4J beta! All I've done by now, seems stable. The most amazing I've used is the Dark Theme! It's my favorite generally to all IDE's I use! @Erel: Keep up the amazing work! Congrats!!!
Erel B4X founder Staff member Licensed User Longtime User May 3, 2015 #6 vfafou said: The only thing I've noticed, is that JVM creates many threads (~430) where most of them are totally unused! Is it a normal state? Click to expand... It depends on your app. Each AsyncStreams object uses two threads. The JVM is capable of handling hundreds of threads. Upvote 0
vfafou said: The only thing I've noticed, is that JVM creates many threads (~430) where most of them are totally unused! Is it a normal state? Click to expand... It depends on your app. Each AsyncStreams object uses two threads. The JVM is capable of handling hundreds of threads.
vfafou Well-Known Member Licensed User Longtime User May 3, 2015 #7 Thank you Erel! This Application does not use Asyncstreams. Is the following state reasonable, with ~150 concurrent devices? The memory use has been gradually increased, starting from ~95MB three days ago. Will this state drive to an out of memory error? By the way, I just saw the following warning: org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1) What does it mean? Last edited: May 3, 2015 Upvote 0
Thank you Erel! This Application does not use Asyncstreams. Is the following state reasonable, with ~150 concurrent devices? The memory use has been gradually increased, starting from ~95MB three days ago. Will this state drive to an out of memory error? By the way, I just saw the following warning: org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1) What does it mean?
Erel B4X founder Staff member Licensed User Longtime User May 3, 2015 #8 The memory usage is expected to increase until a certain limit. As long as it maintains a steady state then the memory usage is fine. vfafou said: org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1) Click to expand... I'm not sure what it means, however over time you will see many communication errors due to disconnections in all kind of states. Upvote 0
The memory usage is expected to increase until a certain limit. As long as it maintains a steady state then the memory usage is fine. vfafou said: org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1) Click to expand... I'm not sure what it means, however over time you will see many communication errors due to disconnections in all kind of states.