Page 1 of 1

Memory grows and grows

Posted: Tue Jul 10, 2018 6:59 am
by ace16vitamine
Hi,

I have a small script and I have no Idea what is going on wrong. After 24h the application is frozen, I monitored the task manager and identified that the memory usage is growing and growing.

The script is something like a HUB. It received datas from other Applications (over socket) every minute and deploy this informations to mobile client applications (also with socket). But every minute the mem usage is growing for 200-800k...

Example, every minute a server is contacting the hub and transfer informations:
accept connections on port 9999 with message "verbindung_client_read"
...
...
get the informations from server...
write it to sqlite DB
...
---
write the informations to mobile client
1) My first Idea was that there is a growing Variable. I startet to clean up all Variables every time but it does not help.

2) I checked every loop, case etc , but the script is clean

3) DBCons are open, closed etc. No issue here. Same with Sockets. After the communication the socket is closed.

Any Ideas how to clean up the memory?

Thanks
Stefan

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 8:12 am
by FourthWorld
How did you check the number of open sockets?

And do you use any timers?

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 9:13 am
by ace16vitamine
I am not using timers (this was also my first Idea).

To check the open sockets I am using

the opensockets (..) in the message box, but all sockets are closes successful. What I find out: I have the same issue if a client connects to collect datas, the socket can be the problem.

Every time the Client or Server is opening a connection to the hub the RAM usage is growing on the HUB

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 4:21 pm
by FourthWorld
Which LC version?

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 4:24 pm
by ace16vitamine
9.0.0 Build 15017

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 8:42 pm
by ace16vitamine
same issue with LC 9.0.1 RC1

Poll is every minute. After 8h the mem usage is now 1GB :shock:

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 10:03 pm
by dunbarx
This seems rather high. I would post the stack to QCC.

Craig

Re: Memory grows and grows

Posted: Tue Jul 10, 2018 11:29 pm
by ace16vitamine
hm... Now it is funny: With 9.0.1 RC1... The process startet growing but it seems that it is stable now. Let me check it tomorrow morning.

Re: Memory grows and grows

Posted: Wed Jul 11, 2018 7:28 am
by ace16vitamine
I can confirm that it is not growing with LC 9.0.1 RC1 Win. I can see some smaller thinks but thats normal, for me it looks like stable now.

Thank you for your help.

Stefan