2 Aralık 2016 Cuma

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding hatası ve çözümü

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


Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding hatası ve çözümü Bu hatanın sebebi, sql serverda kullanılan veri transveri, t-sql sorgulaması yada bir prosedür çalışırken sorgunun time out’a düşmesinden kaynanlanıyor.Eğer bir c# yada vb projesi kullanıyorsak yada asp.net projesi ise bu noktada kodlarda yapıcağımız ufak bir değişiklik ile bu hatayı çözebiliriz.


Bu hatayı en iyi çözmenin yolu öncelikle yapılan sorgunun timeout düşmesindenki sebebi bulmak.Bunu sql server içerisinde sorguyu seçerek Display Estimated Execution Plan;


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


Yani bu sorguda en çok vakit kaplayan sorgulamanın ne olduğu ?;


Sort = Siralamami, yada index planlamasının yeniden yapılarak sorguya ne kadar şekil verip, time out’a düşmesini engelleyebileceğimizi bulabilirsiniz.


c# yada asp.net projelerinde aşağıdaki kodu ekleyerek time out’a düşmesini kod tarafından çözebiliriz.


[php]

using (SqlCommand myCommand = new SqlCommand())


// Time out süresini 150 ‘ ye çıkarıyoruz

// Default time out süresi 30 dur

myCommand.CommandTimeout = 150;


[/php]

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding hatası ve çözümü

Hiç yorum yok:

Yorum Gönder