I have a stored procedure that gets madly played every time it is called from a web application.
I started Sql Profiler and tracked this timeout and finally found out about it:
- When executing statements from MS SQL Management Studio with the same arguments (in fact, I copied the procedure call from the sql profile profile and started it): it ends in 5-6 seconds.
- But when called from a web application, it takes more than 30 seconds (in a trace), so my web page is actually expiring by then.
Besides the fact that my web application has its own user, each thing is the same (the same database, connection, server, etc.), I also tried to run the request directly in the studio with the user of the web application and doesnโt take more than 6 seconds.
How to find out what is going on?
I assume that this has nothing to do with the fact that we use BLL> DAL levels or Table adapters, since the trace clearly shows that the delay is in the actual procedure. Thatโs all I can think of.
EDIT I found in this link that ADO.NET sets ARITHABORT to true - this is good for most of the time, but sometimes it happens, and the proposed work is to add the with recompile option to the saved process. In my case, this does not work, but I suspect it is very similar to this. Does anyone know what else ADO.NET is doing or where can I find the spec?
iamserious Jul 05 2018-11-15T00: 00Z
source share