Setting CommandTimeout on connection string causes nHibernate error

2,091 views
Skip to first unread message

Marc Fairorth

unread,
Apr 2, 2008, 10:16:54 AM4/2/08
to nhusers
We are trying to increase the duration of the timeout on an nHibernate
query. We updated the connection string in web.config, adding
CommandTimeout=600;

nHibernate threw this error as soon as we started up:

NHibernate.ADOException: Could not execute query --->
NHibernate.ADOException: cannot open connection --->
NHibernate.ADOException: Could not create connection from Driver --->
System.ArgumentException: Keyword not supported: 'commandtimeout'.

Does nHibernate not support CommandTimeout? Can someone show me the
optimal way to set the timeout value?

Thanks!

Marc

Ayende Rahien

unread,
Apr 2, 2008, 3:50:20 PM4/2/08
to nhu...@googlegroups.com
you need to setup NHibernate with command_timeout = 600

Ayende Rahien

unread,
Apr 2, 2008, 3:52:11 PM4/2/08
to nhu...@googlegroups.com
BTW,
this is an error with ADO.Net error, not NH one.

On Wed, Apr 2, 2008 at 5:16 PM, Marc Fairorth <fair...@gmail.com> wrote:

Fabio Maulo

unread,
Apr 2, 2008, 10:53:42 PM4/2/08
to nhu...@googlegroups.com
NH support time-out in it's configuration.
Question:
600 ?
10 minutes ?

2008/4/2, Marc Fairorth <fair...@gmail.com>:



--
Fabio Maulo

Marc Fairorth

unread,
Apr 3, 2008, 2:29:45 PM4/3/08
to nhusers
We are basically trying to let this long running query go -- if often
takes more than 30 seconds although we are hoping it won't take all
600!

Meanwhile, even after we updated the web.config with the
command_timeout value, things continue to timeout after 30 seconds.
There was another poster who said that even after doing this, they too
didn't see any change in the timeout experience.

Can anyone confirm that they have seen this actually work? Our
database is SQL Server 2005.

Thanks,

marc


On Apr 2, 9:53 pm, "Fabio Maulo" <fabioma...@gmail.com> wrote:
> NH support time-out in it's configuration.
> Question:
> 600 ?
> 10 minutes ?
>
> 2008/4/2, Marc Fairorth <fairo...@gmail.com>:
>
>
>
>
>
>
>
> > We are trying to increase the duration of the timeout on an nHibernate
> > query. We updated the connection string in web.config, adding
> > CommandTimeout=600;
>
> > nHibernate threw this error as soon as we started up:
>
> > NHibernate.ADOException: Could not execute query --->
> > NHibernate.ADOException: cannot open connection --->
> > NHibernate.ADOException: Could not create connection from Driver --->
> > System.ArgumentException: Keyword not supported: 'commandtimeout'.
>
> > Does nHibernate not support CommandTimeout? Can someone show me the
> > optimal way to set the timeout value?
>
> > Thanks!
>
> > Marc
>
> --
> Fabio Maulo- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages