那位大虾能帮我看看这是个什么错误?

酋长 2003-10-16 02:11:40
ORA-00020: 超出最大进程数 (%s)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: ORA-00020: 超出最大进程数 (%s)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[OleDbException (0x80004005): ORA-00020: 超出最大进程数 (%s)]
System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
System.Data.OleDb.OleDbConnection.InitializeProvider() +57
System.Data.OleDb.OleDbConnection.Open() +203
PowerWebLib.Utils.getConnectionObject(String conn_id)
PowerWebLib.DataSet.Render(HtmlTextWriter output)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +262
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +72
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929


...全文
45 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
酋长 2003-10-18
  • 打赏
  • 举报
回复
如果这样的话,我一次一次的连接、打开、操作、关闭数据库,会不会影响程序的速度?
513 2003-10-17
  • 打赏
  • 举报
回复
会不会是,在一个循环中不明显的调用函数连接数据库呢,正常来说,默认的连接数应该够了
酋长 2003-10-17
  • 打赏
  • 举报
回复
还有没有是别的可能?
bobjeey 2003-10-17
  • 打赏
  • 举报
回复

>>myConnection = new OleDbConnection();
>>if (myConnection.State != System.Data.ConnectionState.Open)
>>{
>> connString = ConfigurationSettings.AppSettings["connectString"];
>> myConnection.ConnectionString = connString;
>> myConnection.Open();
>>}

>>我每次都是这样写的在页面的Page_Load()事件中,又什么问题吗?

当然有问题,你中cs程序编程习惯的毒太深了,bs编程客户端不像cs客户端那样。

>>我用的是全局变量OleDbConnection,应该不是myConnection.Close()的问题。

如果你一定要“持续”连接,你可以通过session来处理。
(可以放在global.asax.cs文件的session_start种处理或当前页面)

Session["sqlconnect"] = (object)sqlconnection........


当需要使用的时候,
if (session["sqlconnect"] != null)
{
sqlconnection = (SqlConnection)Session["sqlconnect"];
}

如果你在页面中使用 sqlconnection.Open(); 必须做到读取数据完毕,就马上close()

zsww 2003-10-17
  • 打赏
  • 举报
回复
帮你顶!!!

-----------努力学习 不断实践 虚心讨教---------
酋长 2003-10-16
  • 打赏
  • 举报
回复
我一开始也是写了一个中间组件,DBConnect.dll里面写了几个数据库的连接,断开的程序,但是我觉得每次去重新连接的时候不也是重新new 一个connection吗?所以后来感觉麻烦久不用了。
hgknight 2003-10-16
  • 打赏
  • 举报
回复
每次Page_Load你就在数据库服务器上打开一个连接new OleDbConnection();
而又从来不关闭
当达到数据库的最大连接数时就出现了“超出最大进程数”

建议你还是别用全局变量,每次打开连接读取数据后就手动关闭
最好是写一个操作数据库的中间类
酋长 2003-10-16
  • 打赏
  • 举报
回复
myConnection = new OleDbConnection();
if (myConnection.State != System.Data.ConnectionState.Open)
{
connString = ConfigurationSettings.AppSettings["connectString"];
myConnection.ConnectionString = connString;
myConnection.Open();
}

我每次都是这样写的在页面的Page_Load()事件中,又什么问题吗?
dongbeiren 2003-10-16
  • 打赏
  • 举报
回复
acewang说的有道理
acewang 2003-10-16
  • 打赏
  • 举报
回复
看着像你的Connection打开后没有关闭,全局的连接打开了也得关闭,不然那会不断打开新连接
酋长 2003-10-16
  • 打赏
  • 举报
回复
这个问题我实在搞不懂,因为出了这个问题后,我在尝试打开其他的页面也打不开,显示的是同样的错误。但是我什么也不操作,等了大概5分钟左右的样子(可能还没有),我又可以打开所有的页面了????
如果是程序的bug,我找不出来,上线后我不惨了??
elite2018 2003-10-16
  • 打赏
  • 举报
回复
try to modify machine.config to thread higher

using Performance Monitor to Test it
dongbeiren 2003-10-16
  • 打赏
  • 举报
回复
up
xxdneu 2003-10-16
  • 打赏
  • 举报
回复
这个是后台数据库的问题,以前用oracle的时候遇到过这种问题,看看数据库的设置
酋长 2003-10-16
  • 打赏
  • 举报
回复
我用的是全局变量OleDbConnection,应该不是myConnection.Close()的问题。
elite2018 2003-10-16
  • 打赏
  • 举报
回复
超出最大进程数 means your Theads is so low that the server can't burden it
hgknight 2003-10-16
  • 打赏
  • 举报
回复
是不是没有加关闭连接
OleDbConnection.Close()
bobjeey 2003-10-16
  • 打赏
  • 举报
回复
大概你在连接数据后没有close他

conn = sqlconnection().....
conn.open();
...

conn.close();

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧