I run the HouseBot server with lots of vbs scipts. Some of them are very large, but also very basic without any use of object etc. I noticed that if such a script has a Function call, memory is used for that and it is not given back to the system when the script gets the state Stopped. This could have something to do with the stack, or garbadge collection. I do not have a recursive problem where certain Functions keep calling themselves and end up in a stack eating loop! I am not even sure if this is HouseBot related or Windows, but this memory leak gets my system down in a few days if I use these scripts often.
One very large script that controls the serial port of my receiver uses about 100 KB every time it gets the state Running. This script runs if the Received Data property Not Equals "_". In other words, if I turn up the volume on my receiver slowly, this script runs about the same amount of times as my volume is increased and therefore uses xx times 100KB of memory.
As a workaround, I could kill HouseBot every other midnight and have it restarted to clear this memory, but I don't think this is the way to go. Or I could rewrite my scripts to not use any Functions, Subs or Calls, but that would also be stupid.
If somebody else uses large vbs scripts with Function .... End Function calls, please open the task manager and have a look to what it does to your memory usage and let me know.
I cannot test this from Windows, because I don't know which task I should monitor to see if I loose memory.
Memory Usage BUG???
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Hi Richard,
I'm not 100% certain on this but it is my understanding that everything in HouseBot runs as threads from the main process. If that is the case you should be able to monitor memory usage on HouseBotServer.exe to see what it does over time.
I would help test this as I use MANY scripts myself but I don't have any that use function calls. If there is any other way I can help don't hesitate to ask.
-- Dave
I'm not 100% certain on this but it is my understanding that everything in HouseBot runs as threads from the main process. If that is the case you should be able to monitor memory usage on HouseBotServer.exe to see what it does over time.
I would help test this as I use MANY scripts myself but I don't have any that use function calls. If there is any other way I can help don't hesitate to ask.
-- Dave