ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Hanson" <mnbo...@gmail.com>
Subject memory leak with windows service?
Date Thu, 06 Sep 2007 15:26:36 GMT
I don't know if this is even the proper place for me to ask these questions
but I'm hoping others may have had a similar experience and can provide some
advice.

I have a Windows Service that runs on a Windows 2000 server. It uses a
system timer that triggers a process to run every 30 minutes.

The process is straight forward, performing 4 separate queries with each
returning a list of objects. Those objects are then used to perform some
functionality which involves accessing remote web services. A majority of
the time only 2 of the 4 queries returns any data. iBatis.Net is used for
all database interaction. Log4Net is used for logging. Spring.Net is used
during the object processing.

The problem I am having is that over time the Windows Service is not
releasing memory and eventually the service will throw an out of memory
exception and crash. The process is 100% managed code. How long it takes to
run out of memory seems to vary but it generally takes more than 24 hours if
not longer.

I already modified the process to return a list of Ids instead of a list of
complete objects. A list of only 100 ids would be a large list so I'm not
dealing with a lot of data. I then query for a full object on an individual
basis using the object id.

I also call the garbage collector directly to try to force memory release.

At this point I don't know what to do as the problem still remains. So I'm
wondering if anyone has seen this kind of memory problem before when using a
Windows Service with .NET. Also does anyone know if I should focus on
iBatis, Spring or Log4Net as the possible cause? I've read about using a
.net profiler tool but I have to admit that I have a hard time understanding
how to profile code.

Thanks,
Bob

Mime
View raw message