2011-03-28 82 views
1

我们正在尝试使uodotnet与连接池合作,目前正在失败。当我们关闭连接池一切正常,但是当我们打开它,我们经常收到超时或错误有以下跟踪输出的一个:为什么Uodotnet连接池超时?

2011-03-28T15:09:28 System.Exception: Non-negative number required. 
Parameter name: millisecondsTimeout Source: UniObjects Class Method: Boolean ObjWait(Boolean, Int32, System.Object) at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj) 
    at System.Threading.Monitor.Wait(Object obj, Int32 millisecondsTimeout, Boolean exitContext) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniObjects.OpenSession(String hostname, Int32 port_number, String userid, String password, String account, String service, Int32 min_poolsize, Int32 max_poolsize) 
    at OurNamespace.UniversePage.OpenSession() 
    at OurNamespace.UniversePage.Page_Init(Object sender, EventArgs e) 
    at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 
    at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 
    at System.Web.UI.Control.OnInit(EventArgs e) 
    at System.Web.UI.Page.OnInit(EventArgs e) 
    at System.Web.UI.Control.InitRecursive(Control namingContainer) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

或者:

2011-03-28T15:09:32 System.Exception: [IBM U2][UODOTNET - UNICLIENT][ErrorCode=81015] The connection has timed out Source: UniObjects Class Method: IBMU2.UODOTNET.UniSession FindSession(Int32) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniPool.FindSession(Int32 pTimeout) 
    at IBMU2.UODOTNET.UniObjects.OpenSession(String hostname, Int32 port_number, String userid, String password, String account, String service, Int32 min_poolsize, Int32 max_poolsize) 
    at OurNamespace.UniversePage.OpenSession() 
    at OurNamespace.UniversePage.Page_Init(Object sender, EventArgs e) 
    at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 
    at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 
    at System.Web.UI.Control.OnInit(EventArgs e) 
    at System.Web.UI.Page.OnInit(EventArgs e) 
    at System.Web.UI.Control.InitRecursive(Control namingContainer) 
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 

不是所有的请求失败(例如,当通过负载测试工具运行时,7/20请求由于超时问题而失败)。

似乎会话仍在池中,创建会话的新尝试正在重复,直到达到超时限制(30秒)。我们使用的是uodotnet.dll 2.1.1.7196版和UniVerse 10.3版。在HP-UX服务器上运行。我们在我们正在测试的开发机器上有一个许可证,在池中有10个连接(理论上!)。我们正在编写一个ASP.Net网站,并且我们在Page_Load()事件中创建一个新会话,并将其传递给所有UniVerse例程,然后在Page_Unload()/ Page_Error()中的会话中调用close。

有关我们做错什么的想法?我们预计,连接池可以提高性能,如果池已满,则回退标准机制,但非池化版本可以同时处理20个请求,但汇总版本通常会失败。我们已经在应用程序的web.config中设置了连接池,将MinPoolSize设置为1,并将MaxPoolSize设置为10,将所有其他设置保留为默认设置。

回答

1

这是由于缺乏UniVerse许可证。我们认为我们有10个,但事实上我们只有1个。调用连接池代码要求获得比我们有权抛出错误更多许可证的许可证,但是只有在连接尝试超时后才会发出。

只是为了混淆事项,使用UniVerse 10.1时出现了一个错误,这意味着您可以拥有尽可能多的连接,只是最近升级到10.3才强制实施您拥有的许可证数量限制。

相关问题