Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated

后端 未结 20 2202
臣服心动
臣服心动 2020-11-22 10:23

I have many users on my web site (20000-60000 per day), which is a download site for mobile files. I have remote access to my server (windows server 2008-R2).
I\'ve

20条回答
  •  无人及你
    2020-11-22 10:51

    I have issue with large calculation in sp_foo that take large time so i fixed
    with this little bit code

    public partial class FooEntities : DbContext
    {
       public FooEntities()
             : base("name=FooEntities")
        {
            this.Configuration.LazyLoadingEnabled = false;
    
            // Get the ObjectContext related to this DbContext
            var objectContext = (this as IObjectContextAdapter).ObjectContext;
    
            // Sets the command timeout for all the commands
            objectContext.CommandTimeout = 380;
        }
    

提交回复
热议问题