我們正在嘗試使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,將所有其他設置保留爲默認設置。