Jmeter : IIS server stops responding - iis

I am learning jmeter to check perform of the web application. This web application is hosted on IIS server and built in php. For testing we use windows 10 PC with 4GB RAM.
I am checking load testing with jmeter where I am sending 10 login request to IIS server with ramp-up periods 3 sec , IIS server stops responding and I have to restart IIS service. If I set ramp-up period 4 SEC then it is working fine.
I m expecting IIS should handle 10 request in 2 sec. For this what configuration should I change in IIS ?

My expectation is that you're hitting IIS concurrent connections limit:
Single JMeter virtual user can open up to 7 connections to the server when retrieving embedded resources so I think you can only do some functional testing using JMeter, but not the load testing.
If you want to identify the limits of your application and conduct some load testing you should consider upgrading to Windows Server operating system which doesn't have this limits.
Alternative solution is migrating from IIS to i.e. Apache which is capable of hosting PHP applications, in this case you will have much more concurrent connections allowed

Related

IIS 10 Application Pool fall a sleep

We have ASP.NET Core application used internally which are used during office hours and a batch that should be processed 3 AM every morning which is scheduled by HangFire like this:
RecurringJob.AddOrUpdate(
() => MyBatch(),
"0 0 3 1/1 *");
The problem is that the Application Pool goes to sleep and the batch isn’t processed if the site isn’t manually started (by going to the website usually).
I have searched SO and tampered with these settings in the Application Pool but with no success:
Some sources that I used to modify the settings:
How to prevent/extend idleTimeout in IIS 7?
https://serverfault.com/questions/443065/how-do-i-prevent-iis-8-from-stopping-idle-asp-net-applications
IIS seems like to sleep until the next request
The Application Pool is used by a total of 7 applications (all being inactive during night when the batch should be processed). The used Application Pool uses .NET CLR Version 2.0.
I'm using IIS version 10.0.17134.1.
How can I make the Application Pool stay active so the batch can be invoked regularly every morning?
I ran into the same issue where my ASP.NET core application goes into idle even with "AlwaysRunning" as start mode for the app pool, "Preload Enabled" set to true for the site, and idle timeout set to 0.
I got it to work by installing the Application Initialization module and setting the .NET CLR version to v4.0. Don't use the "No Managed Code" as that would prevent the Always Running from triggering the app start.
I wrote a blog post on this explaining in more details the steps I took to get the app to run continuously.
They got documentation on how to set up service to run without stopping.
http://docs.hangfire.io/en/latest/deployment-to-production/making-aspnet-app-always-running.html#enabling-service-auto-start
My experience (with older IIS versions 7.5, 8.0) is that it works, but not for app pool recycle/domain unload.
Workaround for me was to send init request on the application_end event.
As above - you need to enable the Service Autostart - in addition to this, if you hit multiple exceptions, I have found that the Rapid Fail Protection has shut down Application pools in the past when using HangFire. So it's also worth disabling (or increasing to reasonable limits) this on the application pool.
I'd suggest you put in your process a single call to the HTTP address first, just like a ping, that would be enought to trigger the site startup if it isn't running for some reason.
One other thing is that, by microsoft's description at MSDN the "AlwaysRunning" option would be:
"Specifies that the Windows Process Activation Service (WAS) will
always start the application pool. This behavior allows an application
to load the operating environment before any serving any HTTP
requests, which reduces the start-up processing for initial HTTP
requests for the application."
That may be, to produce the compilation of web pages that is done on the first call to be done before any request coming, but may not actually run the application at all times.
I am on a Shared IIS Hosting with no access to most settings. What I did is add a Recurring Job that would be triggered in minute interval less than the IIS Timeout/Idle.
RecurringJob.AddOrUpdate<IMyKeepAliveService>("KeepHangFireAlive", svc => svc.KeepHangFireAlive(URL_TO_SELF), "*/4 * * * *");
The above CRON is enough to prevent IIS App pool from going to sleep.
I use RestSharp to make a tiny ping/GET request to "Self".

IIS 6 Parallel connection limit Web service

Is there any setting in IIS 6 where we can limit number of parallel requests coming from specific host / machine.
I have noticed when a specific web service is invoked from specific server with parallel thread, it times out when parallel thread are more than 10., where as similar works fine when number of parallel thread is limited to 10.
Similar behavior is observed even if requests are coming via Load Balancer to server.
Thanks in anticipation
yes you can, have a look here:
https://learn.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/sitedefaults/limits
The limits element replaces the following IIS 6.0 metabase settings:
ConnectionTimeout
MaxBandwidth
MaxConnections
you may also want to check out this article detailing the steps specifically for IIS6:
https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b2b550de-f655-4fb6-9bed-dfc9583b6700.mspx?mfr=true

how many concurrent requests settings for IIS 8.5

How many concurrent requests can be executed in IIS 8.5?
I could not find proper values for how many concurrent requests can be executed in IIS 8.5
As I found out below 2 different values:
By default IIS 8.5 can handle 5000 concurrent requests as per MaxConcurrentRequestsPerCPU settings in aspnet.config
In machine.config, the maxconnection is 2 per CPU as default. So if have 6 core CPU then 12 concurrent requests are possible by default.
So I would like to know that Point 1 is right or Point 2 is right for concurrent requests for IIS 8.5.
Assuming that you are using ASP.NET application, the concurrent requests executed can vary based on the way the application code is written and the framework version you are using to run the application (2.0, 3.5, 4+ etc). Also you are confusing with max connect with concurrent requests. Both are two different things.
For more detailed understanding please read msdn blog ASP.NET Thread Usage on IIS 7.5, IIS 7.0, and IIS 6.0 .
To summarize
MaxConcurrentRequestsPerCPU in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0 determines the number of concurrent requests per CPU. By default, it does not exist and the number of requests per CPU is limited to 12
If your asp.net application is written entirely with asynchronous requests, the default MaxConcurrentReqeustsPerCPU limit of 12 is less and increase this setting MaxConcurrentRequestsPerCPU to a very high number.
In v4.0, the default for MaxConcurrentRequestsPerCPU to 5000
Maxconnection is the setting per HTTP protocol.Any application can only make two concurrent requests to any server.e.g. Your browser(IE 6,7) can make only two connection to your www.example.com. But for speed improvement ,many of the browsers currently make more than 6 simultaneous connections (vary in Chrome, Firefox and IE). Similarly when your server application make a request to a web service or a rest API, the client is your application and maxconnection enforces that for the same server (rest end point), you are allowed to make only two connections .
To increase maxconnection in an ASP.NET application, set
System.Net.ServicePointManager.DefaultConnectionLimit programatically,
from Application_Start, E.g. You can set this to Int32.MaxValue
Hope this helps!
According to this article there is also limitations when running on different Windows versions:
https://blogs.iis.net/owscott/windows-8-iis-8-concurrent-requests-limit
Max concurrent requests
Windows 8:
3 requests
Windows 8 Professional:
10 requests
Windows RT:
N/A since IIS does not run on Windows RT
I assumed (and tested on Windows 10 Home Edition) that on 8 and above this limitations still exists.
These 2 properties are not the same as I think you are implying they are.
MaxConcurrentRequestsPerCPU
Controls the number of incoming requests being handled per CPU
maxconnection
Controls the maximum number of outgoing HTTP connections that you can initiate from a client to a specific IP address.

Web server won't allow more than 4 connections

I am running WEB.API backend with Angular front end, using SignalR (2.2.0) with almost constant data changes.
My problem is that I am able to connect only 4 clients, 5th client would not connect. It will load all web page data, but SignalR won't connect. As soon as I disconnt
one of the 4 already connected clients, the 5th one would connect with not problems.
This is running on Windows 8.1 with IIS 8.5 on separate LAN.
IIS settings is default. Where shall I start looking to solve this?
Thank you.
update: in addition to below link provide by #thab, here is another one with concurent connection limits in IIS per Windows version: http://jpelectron.com/sample/WWW%20and%20HTML/IIS-%20OS%20Version%20Limits.htm
I think it's because you're using Windows 8.1 - there's a limit to the number of simultaneous connections that IIS supports on non-server versions of Windows:
http://weblogs.asp.net/owscott/windows-8-iis-8-concurrent-requests-limit
The problem relates to how SignalR holds a persistent connection (whether Forever Frames, Server Sent Events or Web Sockets) and if the limit is 10 connections, then you'll only be able to get a few users online at once...

Load Balancing SOAP requests

I have a SOAP web service that is running on Windows 2008 R2, IIS7, ASP, and .net v2 framework. The service connects to a 32-bit dll that performs an operation that typically takes 15ms to complete. I have a requirement to manage 100 simultaneous requests per second originating from a single IP address.
Having followed many threads in this forum and the Microsoft site I have been able to tune my service to achive up to 50 simultaneous requests, using soap-ui and load-ui as a test harness.
I think that my only option is now to load balance several servers. Having read about load balancing and tried a virtual application from loadbalancers.org I'm not sure how to load balance the SOAP requests from a single IP, they only seem to balance based by IP address. Is this possible?
Regards, Mark.
If you have Windows Server with Network Load Balancing this is absolutely possible.
Check out http://technet.microsoft.com/en-us/library/cc725691.aspx for more information on it.
It should be standard with your server install.
There are other options but this will be your fastest and easiest since it seems you already have the necessary components.

Resources