我正在運行NHibernate 2.1和FluentNHibernate,並且由於連接池填滿,我不斷收到超時。我無法弄清楚爲什麼。我在NHibernate層後面使用SQL Server 2008。當我碰到最大池數時,連接再次出現最大值。由於數據庫連接用完而導致NHibernate超時
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."
我想一個ISession對象中看到找睡覺的聯繫,但我不能。這是一個NHibernate的錯誤?有沒有解決方法?
我們可以看到你使用Session的地方的一些代碼,你在使用塊中使用會話嗎?你是否按照請求進行會話,並且之後沒有清理會話? – Phill