Weare running server agents which are accessing SQL via a DLL which in effect provides an API to the SQL database.
The agents use createobject, and all objects are set to nothing when finished. However memory is not released. Performance manager shows increase in memory when these agents run but no decrease.
Possibly the DLL code (VB) is not releasing something, perhaps not closing the SQL connection.
Any ideas how to fix this? The VB developers (another firm) swear they set everything to “nothing” in their DLL code. Currently we have a scheduled reboot of Domino twice a day to keep the server from crashing “out of memory”.
Subject: Memory leak: createobject on server calls DLL to access MS SQL server
Couple of things… you wrote it’s a DLL, so this means its an in-process ActiveX object they provided, which makes it a bit more difficult to track in terms of memory allocations, etc.One thing to check with the VB developers is how they compiled that dll, namely wether it is marked for ‘Unattended Execution’ and ‘Retained in memory’ (which, as the name suggests, prevents the object from getting destroyed in memory EVEN if told to do so by the creating process (Domino). However, that doesn’t explain the leakage, but its helpful to find out.
Another option for them would be to compile it as an out-of-process ActiveX server object instead (a .exe instead of a .dll). You’d use it the same way via “CreateObject”, but it wouldn’t run inside the Domino server process/memory anymore and therefor shouldn’t cause Domino to run out of memory. If their code leaks memory, it would then be easy to track down, as the allocated memory would be directly associated with the .exe (in the task manger or process explorer, etc.), whereas if its a dll, you can’t easily figure out where the memory goes as Domino manages its own memory and won’t release once-allocated memory (it’ll re-use it later).
Thomas - IBM