Perpetual loop and out of memory (OpenInsight 32-Bit)
At 14 NOV 2007 07:19:55AM Enrique Murphy wrote:
Hi. I am having trouble with a process that acts as a communication gateway between OI and a socket server. The process is triggered by the TIMER event of a window, and performs a SELECT against a Universe table that contains the transactions to send to the server. After some time (2 hours or so) of being running, the OEngine freezes with an "Out of Memory" error, and an error saying "Visual Basic - Abnormal program termination". This process has always ran correctly in W2000 or NT workstations, even with less memory (96MB,128MB). The problem is in a machine with XP Pro Service Pack 2 with 256MB of RAM.
I don't know what may be causing this crash:
May it be something with XP and the minimal amount of memory?.
May it be something with the selection against Universe?Any help would be appreciated.Enrique
At 14 NOV 2007 08:40AM John Bouley wrote:
Enrique,
I had a similar problem with a VB project I worked on years ago. It was a program that had an Access DB open and was continually working against a table. I found that if I kept reusing the connection object (for speed purposes) the program would crash with an out of memory error (similar to yours). I ended up setting a counter and if the counter reached a certain number like 100 then I would destroy the connection object and recreate.
Not sure how this relates to your problem other than it must be using a VB process to access the Universe table.
HTH,
John
At 15 NOV 2007 06:52PM Enrique Murphy wrote:
I think I found it. The problem seems to be as follows:
I wasn't sending any KeepAlive to UV, because I believed that repetitive SELECT comands would keep the session open. But I think this is not true. UV seems to be caching the SELECT commands and not taking them as session activity.The process is a window with a TIMER event which triggers the selection commands to see if there are any new to send. When the U2 connection was terminated, each execution of the event halted with an error message (because the UV table could't be opened), thus not liberating the memory it used. So the TIMER kept triggering and stucking with the error message until the process reached the maximum memory allowed for it, so the OS stopped it.I put a keepalive call in each cycle and now the process runs OK.May someone confirm me that is true that UV does not take repetitive selects as session activity?Thanks.