Queued responses from SQL server with ASP website hosted in IIS - asp.net

We're running an ASP website in IIS 7.5.
The site has a SQL backend database, running on a seperate SQL server.
There is a 10Gb fiber connection between both of these servers via a switch.
We're seeing some delays in requests to the SQL server being answered.. so like a request to add a record might go through within 0.25 seconds for one user, but then the same task might take 6 seconds for another user, or even the same user but later on in the day.
I haven't as of yet been able to identify any pattern to the performance issues, except to say it seems as if something is getting queued somewhere.
The machines themselves are virtual machines hosted on HyperV hypervisors.
They have an absolute abundence or memory and CPU resource allocated to them.
The network on the hypervisors is bonded for redundancy, and VMQ is disabled.
I've had perfmon running on both servers for quite a while and can't see anything obvious that points me in a particular direction.
Has anyone seen this sort of behavour before?
Thanks in advance

Related

How do I autostart an IIS service on shared hosting (no access to ApplicationHost.config file)?

Is it possible to have an IIS service autostart with no access to the ApplicationHost.config file?
I have shared hosting on GoDaddy, with a few IIS services running. One of these services contains a method that starts a timer and updates some data on my server every 15 minutes. This is necessary for my Windows Phone app to function correctly.
However, GoDaddy seems to restart their servers once or twice every weekday at random times, which stops the service (and the necessary timer) from running until I call the method from a client application. I have to check pretty frequently to see if things are running and then start the service manually.
I'd like the service to start automatically whenever GoDaddy restarts the server, but since it's shared hosting I don't have access to ApplicationHost.config, and there doesn't seem to be an option for it in GoDaddy's IIS settings.
Anyone have any ideas?
Thanks!
IIS will recycle/terminate an idle Web app/w3p.exe every 20 minutes by default, for many good reasons. IIS also have a lot settings to restart Web apps that consume to much resource or generate too many errors. GoDaddy would restart servers regularly to clean up environment, since the servers might host a lot web applications with poor quality.
Basically you can do
You have a 24x7 machine, and you write a program or use cUrl to send
client requests to your Web app every 1, 5, or 10 minutes to wake
up.
If you don't have a 24x7 machine, you may try some function in
Amazon AWS to do wake up/warm up calls. I don't remember the
respective service name in Amazon.
Or you contact Godaddy's technical support about this issue.

classic asp IIS 7.5 sql server performance

We have been using this external program thats using classic asp, and sql server express 2008R2 on windows server 2008R2 running IIS 7.5
It has been running fine until the last month when almost each page is taking atleast 2 minutes to load. If i reboot the web server, everything works fine for the first few mins until it goes back to same old issues.
It appears that the app is resetting some setting after 2 minutes and then its able to respond. I am not sure what setting that would be.
I tried to set up failed trace request, and found that it never finished or rather the log file never capture the error. (even after increasing the log file size. I tried this multiple times)
The program is using SQL server native client 10 to talk to sql server. I have played around with connection pooling, changing the app pool from classic to integrated and vice versa. It does not seem to be a db issue, as the activity monitor does not show too much consumption and sql server wait stat that i see is ASYNC_NETWORK_IO and PREEMPTIVE_OS_WAITFORSINGLEOBJECT which relates to the fact on how the client is processing the results sent from the db server.
I am looking for suggestions on how to debug this issue. My guess has to be the way the connection from asp to sql server.
Thanks in advance.

SQL Server Session State, web farm, and counting the sessions

I have 2 load balanced web servers. My application is using the SQL Server Session State database on SQL Server 2008.
The 2 web servers are identical in terms of IIS configuration, and if I understand correctly, the two web apps on the two servers will be mapped to the same app id in the ASPStateTempApplications table since they have the same IIS configuration. So, counting the number of sessions associated with this app Id (from the ASPStateTempSessions tabel) will result in the total count of sessions on the two web servers together.
My questions is:
Is there a way to know how many sessions are active on each server individually?
I have the problem that when I take one server out of the load balance, I want to know if there are still any active sessions on the server or not before recycling it.
Another scenario, if I have to recycle the IIS on one of the servers because another web app on the same server is crashing, I would like to know how many sessions will be affected when I do so.
Thanks.
Basically, they all may and actually SHOULD be active on both ) Because in this mode sessions are not bound to the web-servers at all.
You can stick each user to a single server with load-balancing techniques on your gateway and if so - better to use InProc mode with all its benefits )
Since the session data is stored in SQL Server, you shouldn't have to worry about how many sessions are active. Once the server is shutdown (or IIS is recycled, depending on the configuration), the load balancer will automatically send any new requests to the active IIS server. With the session data stored in SQL, the active server can retrieve the session data and the user will be unaware that any server switching has occured.
Ideally, you should test this procedure periodically to make sure everything is configured correctly. Also, you should follow this procedure when installing patches to the servers.

Computer/Application having trouble and getting slow while accessing Sql server through LAN, Network is fine

I have an web project in asp.net in one of my computers which are connected internally through LAN. The database is in Sql Server kept in another computer. The LAN is connected well. There is no connection error in my programming also. But sometimes in this particular system the page is taking long time to be open, sometime it is showing some exceptions(not everytime again and again). What can be the problem? How can it be solved?
The same project is running good in other computers as well.
My network seems ok, as I can acccess the computer hosting SQL server.
You're just having connection problems.
The page waits for the SQL query's answer to return, and it won't load until it gets the answer.
Check your LAN's connection by pinging between the computer with the project and the SQL server.
If this really is the problem, then the exceptions are probably time-outs.

Bandwith throttling in IIS 6 by IP Address

I am writing an application that downloads large files in the background. All clients are logged in locally, or through a VPN. When they are logged in locally, I do not want to throttle downloads. However, I would like to limit downloads to 10 KBps when the user is connected via VPN. I can differentiate between these users by IP Address range.
Since this is an AIR Application, I figure I will throttle via server-side since I can do it from either the server itself (IIS 6) or the web service (asp.net / C#).
Throttling through IIS 6 seems to work fine, but it seems like it has to be done across the entire web site. Is there anyway to do this via IP? Or will I have to rig this up in .NET?
My first thought is this. I don't know if it would work but it would only take a few minutes to try.
Create two IIS web sites on the same server. The first site is bound to the public IP, but the second site is bound to the private IP. Both point to the same folder on the file system.
Your VPN users will be accessing via the private IP, so you can setup a "site-wide" rule on that site that will only affect VPN users. This should work for almost any IIS6 setting, including bandwidth throttling.
Worth a try, at least.
--
Edit: Tried this and it worked flawlessly.

Resources