In my C # .NET 3.5 application, I am using CastleProject ActiveRecord over NHibernate. This is a desktop application using MS SQL Server 2008. I set the ADO command timeout to 0 to prevent a timeout exception during bulk operations:
<activerecord>
<config>
...
<add key="hibernate.command_timeout" value="0" />
</config>
</activerecord>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
...
<property name="command_timeout">0</property>
</session-factory>
</hibernate-configuration>
However, I still get a timeout exception! NHibernate Magazine shows something like this:
Somewhere in the beginning:
2010-10-02 06: 29: 47 746 INFO NHibernate.Driver.DriverBase - setting the timeout for the ADO.NET command to 0 seconds
Somewhere at the end:
2010-10-02 07: 36: 03,020 DEBUG NHibernate.AdoNet.AbstractBatcher - IDbCommand, IDbCommand s: 0 2010-10-02 07: 36: 03,382 NHibernate.Event.Default.AbstractFlushingEventListener - NHibernate.HibernateException: --- > System.Data.S qlClient.SqlException: . . System.Data.SqlClient.SqlConnection.OnError(SqlException , Boolean breakConnection)
? ?