为什么连接池的Uodotnet超时?

时间:2011-03-28 14:20:13

标签: asp.net universe uniobjects

我们正试图让连接池与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 个答案:

答案 0 :(得分:1)

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

只是为了混淆问题,使用UniVerse 10.1有一个错误,这意味着你可以拥有任意数量的连接,只是最近升级到10.3,强制限制你拥有的许可证数量。