B4J Question About debugging and threads memory management

vfafou

Active Member
Licensed User
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!
 

vfafou

Active Member
Licensed User
Did you encounter an out of memory error?
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.
 

vfafou

Active Member
Licensed User
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!!!:):):)
 

vfafou

Active Member
Licensed User
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?
Screen Shot 2015-05-03 at 09.24.37.png
 
Last edited:

Erel

Administrator
Staff member
Licensed User
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.

org.eclipse.jetty.websocket.api.ProtocolException: Client MUST mask all frames (RFC-6455: Section 5.1)
I'm not sure what it means, however over time you will see many communication errors due to disconnections in all kind of states.
 
Top