This project is read-only.

SQL Command Timeout

Topics: Core, Customizing Orchard, Troubleshooting, Writing modules
Dec 23, 2014 at 11:53 PM
In case of big data, we probably face queries that lasts over 30 secs in order to return a result. Not an achievement but we may face it. What is the best way to set command timeout bigger than the default one?
Dec 30, 2014 at 3:52 AM
Sorry, I'm not a SQL expert, so here just trying to help you. Maybe you already know the following option, but I can't test it right now, and I'm very interesting to know if it works and/or you find another way. I have read somewhere that NHibernate read the timeout setting in different locations (e.g depends on batch command or not)

So, in AbstractDataServicesProvider.cs, I was thinking to add these 2 lines, or only one of them if it works
.ExposeConfiguration(cfg => { 
        .SetProperty(NHibernate.Cfg.Environment.CommandTimeout, "100") // at system level
cfg.SetProperty(NHibernate.Cfg.Environment.CommandTimeout, "100"); // at factory level
Jan 5, 2015 at 5:59 PM
FYI, it seems to work. In my case, I finally used another approach (with Redis) as the data where really heavy. Thanx anyway.