IIS causing high SQL processes load in SQL Server - sql

I use SQL Server 2016 edition. I have a web server which runs IIS.
Sometimes, during the day, iis causes so much sql server processes unexpectedly. When i execute sp_Who3 procedure, i see so many resul set higher than it should be. For example, my db transactions should be around 45 - 80. But, instantly it goes up to above 400. What can cause this issue? How can i troubleshoot for this problem?
When i reseted iis server, database returns to the normal value. But, after several minitues like 10 or 15 minutes the problem happens again.
sp_Who3 open source procedure
No error message. Just high numbers of sql processes.

Related

Passthrough SQL Query via MS Access

Currently, I have two separate SQL Server instances that I am querying using pass-through SQL queries via a form in Microsoft Access.
The queries to SERVER1 work every time without fail. I'd say about 80% of the time the queries to SERVER2 don't work after Access has been closed and re-opened until I go in and "modify" the OBDC connection string and save the query. I have quotes around modify because if I edit one character in the string and re-add it and then save, it usually starts to work again (but not always), even though the string hasn't changed. And once it works it will continue to work until once again Access is closed.
It's usually one of three errors, here are two of them and the third error which I get less frequently is that the login is incorrect:
The OBDC connection string is as follows (for what it's worth I also tried ODBC Driver 17 for SQL Server and got the same results):
ODBC;Description=SERVER2 PASSTHROUGH;DRIVER=ODBC Driver 11 for SQL Server;SERVER=SERVER2;UID=Test;PWD=Password;DATABASE=MyDB;LANGUAGE=us_english;ApplicationIntent=READONLY;
How do I go about solving this problem? Also, I am willing to provide any clarifying information.
Thanks!
Thanks to Alex for the reply.
Alex recommended going to SQLCMD Unable to complete login process due to delay in opening server connection. I should have been more scientific but I used a shotgun approach... I set my shared memory to disabled, as well as increased the connection timeout and command timeouts.
This then produced a new error for me similar to the one here No process is on the other end of the pipe (SQL Server 2012).
As many of the comments suggested, my SQL server was set to SQL Server and Windows Authentication mode, I changed it to Windows Authentication mode, and then back to SQL Server and Windows Authentication mode, and restarted my SQL server.
And for now, my problem has not shown up through multiple MS Access restarts and a few PC restarts as well for good measure. Fingers crossed.

Timeout from SQL server only when query returns multiple rows

I have an issue with performing sql queries, that I dont know what to do about. Tried many things and many creative Google searches.
I have a website that connects (ADO.NET) to a SQL Server 14 (we switched from version 10 where everything worked). From the website a search is performed and when the search result only returns one row, then everything works fine. When the search result returns more than a single row, then I get a timeout from SQL server.
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the
server is not responding.
The SQL query is excatly the same. Only the parameter changes.
All SQL queries works fine within SQL Management studio.
The SQL Query uses a few views and joins and is very simple with just one parameter. Within management studio it takes 2-3 seconds to complete.
If I change back to the identical database on the old SQL Server 10, then it works again.
What I have tried:
1. Checked the execution plan and its identical for both searches.
2. Changed server memory allocation.
3. sp_refresview.
4. SQL Profiler gives no warnings or raised eyebrows.
5. sp_who2 shows no blocking.
6. Changed Remote Query Timeout to 0 (no timeout).
7. Increased timeout in web.config to 120 seconds.
8. set arithabort = on.
9. set nocount = on.
Still get the timeout.
I'm so confused...
EDIT
As far as I can see, the SQL Profiler tells me that the SQL transactions completes without any problems. But for some reason the result never reaches the web server. It only happens for specific SQL Queries so for the most part everything is fine with the communication to/from the SQL Server and the web server.
Also when I run the website locally from Visual Studio, then everything works perfectly! No timeouts or anything. I only happens for SQL Query XYZ from the web server.

Simple SQL Server query always time out

We have a stored procedure that has been working perfectly for over 10 years. A few days ago it started timing out. I run it from the Query console in SQL Management Studio and it timesout. I restart the server and then it runs in 1 second...
You should consider the changes happened to your system over these 10 years, maybe you have added some background services that is doing some heavy sql updates/insertions while you are running your query.
I think you can have a clear vision on the performance of your query if you run it on a staging server or a local machine( which normally have a different load of sql operations ), observe the time it takes to execute your query, do your tries from time to time.
If the execution time of your query on staging server is constant, then your query is not the cause of the issue.

MS Access Query Timeout When inserting row in SQL Backend

My users are receiving the query timeout error when they try to insert data to SQL server 2008 through an Access 2010 form. The error msg specifically occurs when users move off the record having keyed in all data fields.
When I look into Activity Monitor in SQL Server I can see many blocked SPIDs throughout the day but they do soon clear up. I don't know why this happens and the only solution seems to be restarting the SSMS Services. I don't think its a memory issue as the server has got 8GB which is plenty. The SQL DB is only 400 MB, but there are many transactions taking place across 2 sites.
I do notice that the SSMS memory consumption is around 3.5GB at the time of this error. After the restart this goes down of course.
Where do I start looking? is it network related or is it a blocked process due to local VBA code which could be moved to SQL Server? or is it cache related?
I'm no DBA so not sure of how to go about the search.
Thanks

ColdFusion 8: Database Connection Reset Error

I have been getting these intermittent ColdFusion Database connection reset errors and was wondering if anyone had experience with this and had a particular solution that worked?
Here is the error:
Error Executing Database Query.[Macromedia][SQLServer JDBC Driver]A problem occurred when attempting to contact the server (Server returned: Connection reset). Please ensure that the server parameters passed to the driver are correct and that the server is running. Also ensure that the maximum number of connections have not been exceeded for this server.
This doesn't happen with any particular query, the code breaks in different queries every time, returning a SQLState error 08s01. These query's logic are fine, no logic errors etc. I checked the network logs and there were no database server connection refusals at the time of the error. Once the first error occurs, it keeps happening for no more than a minute or so at random times of the day, every few days. I've googled this thing and so far anyone that has had this issue was only on CF6 or 7, which the fixes coldFusion put out are only for CF6 or 7.
Server configuration wise:
The ColdFusion server is version 8
The database server is SQL Server
2005 Standard
The database connections allowed
setting is set to unlimited on both
SQL Server and ColdFusion
Any help would be greatly appreciated, Thanks!
I'd personally try to update JDBC driver ( http://sourceforge.net/projects/jtds/ ) and add Validation Query if not already existing. I used once tool which was constantly checking TCP connections between servers, detecting even milisecond gap, check this tool http://www.colasoft.com/ping_tool/ .
Have you already resolved the issue?
I'm having the same problem on CF8 VPS, and after doing some research online I found this post:
http://www.mail-archive.com/cf-talk#houseoffusion.com/msg302264.html
It says it's related to some features on the network card and something on the SP2 for Win2k3 that messes it up. Don't know if that applies to you but just in case.