you should write your own database access engine, :-)try to set the Max Pool Size to a smaller number, and always close your connections when you are done with them

解决方案 »

  1.   

    思归兄,请帮帮我,也许只有你才能帮我了。请听我的介绍。
    系统介绍:
        我开发的医院信息系统,表的用户是建立在数据库上来维护的,所以,有可能几十个数据库用户一起登录。程序介绍:
        用ASP.NET+Oracle。在ASP.NET中,我是用OracleClient来连接Oracle的。每次执行完毕,我都会close connection,但是没有dispose。但是对于其他的对象,command, adapter我都没有dispose。connection的close() 和dispose()的区别在哪里?    遇到的现象:
        系统正在试运行中,但是隔上半个月-一个月会出现这样的现象。用户登陆到系统之后,凡是有数据库访问的页面全部报错。应该是不能连接到数据库。但是隔了几分钟,又自动的恢复正常了。我看了一下Oracle的Session,才50多个。
        我看了数据库的Session,每一个数据库用户的Session基本上都是4-5个。为什么一个数据库不能只用1个Session呢?我的问题:
        但是每个真的很奇怪。不知道问题出在数据库还是出在WebService。不知道是Oracle Session过多,还是WebServer这边连接池连接太多的问题。所以我想问你,是否需要dispose()?为什么有的时候访问Oracle会登录不进去?我们向院方也很难解释,这是怎么回事?我们称之为系统不稳定。    你能不能帮我分析一下,如何才能彻底解决这样的问题。感激不尽!
      

  2.   

    FIX: Connection Leak with .NET Data Provider for Oracle in ASP.NET
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q330126WORKAROUND
    You can release the Oracle connections by restarting the IIS Admin service and all IIS dependant services and processes (such as dllhost.exe, and aspnet_wp.exe). 
    :-)consider to install .NET 1.1, but then, you might need to modify your namespace to System.Data.OracleClient