RE: Memory issue using OleDbConnection with SQL Server

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 10/04/04


Date: Mon, 4 Oct 2004 05:29:05 -0700

Have not seen this. I would run profiler and some counters before firing up
the process and see what is getting munged. Until you can see what is causing
the problem, you will not know.

If you are firing massive numbers of updates, or similar, I would consider
running on one connection, or moving some of the load onto SQL Server (T-SQL
updating rather than C#).

---
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"ecgn" wrote:
> Hi!
> 
> First of all, I'm not quite sure if this is the right place asking this 
> question, it may very well be a SQL Server issue, but I'll start here. 
> 
> I have a problem with the SQL Server database "running wild", consuming all 
> available system memory, when running a C# application that uses 
> OleDbConnections. 
> 
> For normal operation and load, it seems to do OK, but when I do a lot of 
> database calls (very simple SELECT:s, but tens of thousands of them) during a 
> short period of time, the server memory literally goes through the roof. 
> Eventually, 100% of the available memory is used and the system stalls.
> 
> If stop calling the database before it stalls, the memory usage will remain 
> at a very high level for a period of time (at least 30 minutes), but 
> eventually it drops down to where it was prior to the application execution.
> 
> What I've tried to do:
>  - I thought it might have something to do with the database connections 
> being left open in a pool, but the high memory use remains even after the 
> application is stopped. 
>  - I have also tried running both with and without transactions on the 
> connections in question, but no change.
>  - The 30 minute (or so) delay in memory usage drop indicated open resources 
> that timed out, but I have made sure that all DataReaders are closed after 
> use, both for normal and exception cases in the code. Apart from the 
> connections, does anything else have to be explicitly closed?
> 
> Has anyone experienced this with the OleDbConnection, or is it a SQL Server 
> only issue? Any hints or tips are greatly appreciated! Thanks!
> 
> //ecgn
> 


Relevant Pages

  • Re: Access 2007->SQL Server2005 "connection was forcibly closed",G
    ... an Access database in former times this was a lot of work which took me ... closed connections - but all of these errors are in the version which used ... the SQL Server 2000 and everything worked ... client for programming easy, fast and good applications. ...
    (microsoft.public.sqlserver.connect)
  • Re: Memory issue using OleDbConnection with SQL Server
    ... > question, it may very well be a SQL Server issue, but I'll start here. ... > I have a problem with the SQL Server database "running wild", ... the server memory literally goes through the roof. ... > connections in question, but no change. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ORA-12518, 04030 errors after 9i-10G upgrade.
    ... All went ok until users started connecting in 100+ numbers, database is ... set up for dedicated server connections, this was never a problem in 9i. ... out of process memory errors. ... that Oracle is having issues with OS resources. ...
    (comp.databases.oracle.server)
  • STORE.EXE using all memory.
    ... 4x256MB registered ECC memory. ... AVG for Exchange 2000. ... The SQL server database is not very large, ...
    (microsoft.public.exchange2000.information.store)
  • Memory issue using OleDbConnection with SQL Server
    ... I have a problem with the SQL Server database "running wild", ... the server memory literally goes through the roof. ... connections in question, but no change. ...
    (microsoft.public.dotnet.framework.adonet)