麻烦问个问题,提示“Timeout expired!”,然后导致程序死掉。帮忙看看了,在线等待!

zcmmhu 2003-09-17 09:15:53
提示错误如下所示:
Server Error in '/department' Application.
--------------------------------------------------------------------------

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.
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.InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.

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:


[InvalidOperationException: Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached.]
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +396
System.Data.SqlClient.SqlConnection.Open() +384
department.teacher.CalculateRecord() in e:\wwwroot\department\teacher.aspx.cs:101
department.teacher.Page_Load(Object sender, EventArgs e) in e:\wwwroot\department\teacher.aspx.cs:46
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +731

程序做得有些时间了,以前用着挺好的,不知现在什么原因,为了取消上传文件大小的限制,我在web.config文件中加了如下代码,是不是这里错误了。
<httpRuntime executionTimeout="600" maxRequestLength="100000" useFullyQualifiedRedirectUrl="false" />

先谢了,还望各位多多关照。一定感谢!
...全文
86 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
zcmmhu 2003-09-17
  • 打赏
  • 举报
回复
好好学习e文!呵呵
zcmmhu 2003-09-17
  • 打赏
  • 举报
回复
呵呵,不好意思,哈哈
谢谢各位了!
这里的确有问题。
树猫 2003-09-17
  • 打赏
  • 举报
回复
看错误提示是:数据库连接池耗尽。
所以可能是你每次数据库操作后没有及时关闭 当前数据库连接对象,从而导致数据库连接池资源耗尽。默认的连接池中的连接对象是100个,可以通过 Max Pool Size 来修改

每次数据库操作后及时关闭当前数据库连接对象
zcmmhu 2003-09-17
  • 打赏
  • 举报
回复
检查是否有打开的数据库连接没有及时关闭

这个我再检查!

发生问题的过程中有人 在传大文件吗?
.net上传文件时对文件大小有限制,当时做的时候对这块好想做了些什么,呵呵,csdn上copy的也忘了是什么了,呵呵,我估计应该是这里的问题吧!看来要过去看看了!

谢谢 lese9(乐色.Net) 了,呵呵
zcmmhu 2003-09-17
  • 打赏
  • 举报
回复
大文件传输的过程中没问题,但是传输过之后就出错了!
传了个三兆的东西。
有上传的程序,是不是这里的问题?
jackyhzzjcn 2003-09-17
  • 打赏
  • 举报
回复
发生问题的过程中有人 在传大文件吗?
jackyhzzjcn 2003-09-17
  • 打赏
  • 举报
回复
检查是否有打开的数据库连接没有及时关闭
zcmmhu 2003-09-17
  • 打赏
  • 举报
回复
自己先顶一下了,麻烦了!分不够可以再加!

62,243

社区成员

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

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

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

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