I have an IIS 8.5 running in 2012R2 VM on Azure, hosting multiple websites with different IIS Application Pools. Occasionally the VM CPU loading will suddenly jump up to 100% which is held by the (w3wp) process as shown in the Performance Alert. But I don't know which IIS Application Pool creates the load so to set the CPU Usage Limit in that particular Application Pool. Is there any way to identify which IIS Application Pool from a process label (w3wp#11)?
IIS suddenly jumps to 100% CPU loading
Slow performance of classic ASP pages with Windows 2016 IIS10
We are having one ASP.NET Website previously hosted on Windows 2008 Server with IIS 7.0. Few days back we have decommissioned that server and hosted the application in Windows 2016 Server with IIS 10.0. After that we are facing severe performance issue for that Website. I have tried to dig little bit to understand the problem. First of I notice problem with High TTFB while requesting the page -
I have also configured Failed Request trace and found ASPNetPageRenderLeave is having high value -
We are connecting Oracle database from the code with MSDORA (ADODB) Connection Provider. For testing I have created two pages, one connecting Oracle DB and populating 4 Dropdownlists and another having hardcoded dropdownlist values without DB connection. For 1st case, Waiting time is around 332S and without DB its 30S (although 10 times lower, but still very high waiting time).
After reading lot of forums I have changed below settings in Server side -
- Installed ASP, Application Initialization on IIS
- Changed App Pool Start Mode to AlwaysRunning
- Increased Maximum Worker Process from 0 to 4
- On Website PreloadEnabled set as True
- Enabled Static & Dynamic Content Compression.
- Enabled Output Caching for aspx files (both User-Mode & Kernel Mode)
I have also check hardware resource utilisation of the server and found -
- CPU / Utilization 2*2.8 / 1 %
- RAM 8 GB / 25 %
None of the above changes fixed the issue. Sample code without DB Connection (Its also taking 30-45secs to load) -
<%@ Page Language="VB" CodeFile="~/Common/common.aspx.vb" Inherits="ManualInputBI_Include_Common" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.OleDb" %><%@ Import Namespace="System.Data.Odbc" %><%@ Import Namespace="System.ComponentModel" %><%@ Import Namespace="System.Configuration" %><%@ Import Namespace="System" %><%@ Import Namespace="System.Net" %><%@ Import Namespace="System.Globalization" %><%@ Import Namespace="System.Web.UI" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><% labelDEVStatusInfo.Text = HttpContext.Current.Request.AppRelativeCurrentExecutionFilePath.ToString() & " - implementation in progress. " labelDEVStatusInfo.Visible = False %><!--#include file="~/Include/UserInfo.aspx"--><!--#include file="~/Include/X_Screens_menu.aspx"--><% rootWebConfig_CDS = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("/Manual") cCDS = rootWebConfig_CDS.ConnectionStrings.ConnectionStrings("cCDS").ConnectionString %><% labelScreenName.Text = "Test" & " screen" %><% If Not (USR_RoleName = "ADMIN" Or USR_RoleName = "RBI" Or USR_RoleName = "SO" Or USR_RoleName = "STO") Then Response.Redirect("../../default.aspx") Else If USR_RoleName = "ADMIN" Or USR_RoleName = "STO" Then Response.Redirect("./test.aspx") Else If USR_RoleName = "ADMIN" Or USR_RoleName = "RBI" Then Response.Redirect("./test2.aspx") End If End If End If %><html xmlns="http://www.w3.org/1999/xhtml"><script runat="server"></script><head id="Head1" runat="server"><title></title></head><body><form id="form1" runat="server"><div id="divAppTitle" style="font-size: 16px; border-bottom: #000066 2px solid"> Manual Input BI<br style="font-size: 12px" /><asp:Label ID="labelScreenName" Style="font-size: 12px" runat="server"></asp:Label><span id="USR_Name" style="font-size: 12px">/ Logged in as <%= Me.User.Identity.Name.ToString()%> /</span></div><div><table><tr><td><asp:Label ID="labelSelectFY" runat="server" Width="100px" Font-Names="Verdana" Font-Size="10pt">FY</asp:Label></td><td><asp:DropDownList ID="DropDownListFY" runat="server" Font-Names="Verdana" Font-Size="10pt" AutoPostBack="True"><asp:listitem text="Red" value="1"></asp:listitem><asp:listitem text="Black" value="2"></asp:listitem><asp:listitem text="Blue" value="3"></asp:listitem><asp:listitem text="Green" value="4"></asp:listitem><asp:listitem text="Yellow" value="5"></asp:listitem></asp:DropDownList></td></tr><tr><td><asp:Label ID="lblSelectYM" runat="server" Width="100px" Font-Names="Verdana" Font-Size="10pt">YM</asp:Label></td><td><asp:DropDownList ID="dropdownSelectYM" runat="server" Font-Names="Verdana" Font-Size="10pt" AutoPostBack="True"><asp:listitem text="Red" value="1"></asp:listitem><asp:listitem text="Black" value="2"></asp:listitem><asp:listitem text="Blue" value="3"></asp:listitem><asp:listitem text="Green" value="4"></asp:listitem><asp:listitem text="Yellow" value="5"></asp:listitem></asp:DropDownList></td></tr></table><table><tr><td><asp:Label ID="lblSelectCountry" runat="server" Width="100px" Font-Names="Verdana" Font-Size="10pt">Select Country</asp:Label></td><td><asp:DropDownList ID="dropdownSelectCountry" runat="server" Font-Names="Verdana" Font-Size="10pt" AutoPostBack="True"><asp:listitem text="Red" value="1"></asp:listitem><asp:listitem text="Black" value="2"></asp:listitem><asp:listitem text="Blue" value="3"></asp:listitem><asp:listitem text="Green" value="4"></asp:listitem><asp:listitem text="Yellow" value="5"></asp:listitem></asp:DropDownList></td></tr><tr><td><asp:Label ID="lblSelectStore" runat="server" Width="100px" Font-Names="Verdana" Font-Size="10pt">Select Store</asp:Label></td><td><asp:DropDownList ID="dropdownSelectStore" runat="server" Font-Names="Verdana" Font-Size="10pt" AutoPostBack="True" ><asp:listitem text="Red" value="1"></asp:listitem><asp:listitem text="Black" value="2"></asp:listitem><asp:listitem text="Blue" value="3"></asp:listitem><asp:listitem text="Green" value="4"></asp:listitem><asp:listitem text="Yellow" value="5"></asp:listitem></asp:DropDownList></td></tr></table><p><asp:Label ID="labelDEVStatusInfo" runat="server" BackColor="#FFFFFF" ForeColor="#999999" Font-Names="Verdana" Font-Size="10pt" /></p><div id="divMenu" runat="server" style="font-size: 10px; right: 10px; visibility: visible; position: absolute; top: 10px"><p><asp:PlaceHolder ID="Menu_Content" runat="Server"></asp:PlaceHolder></p></div><div id="divLoginStatus" runat="server" style="font-size: 10px; right: 0px; visibility: visible; position: absolute; top: 0px"><p><asp:LoginStatus ID="LoginStatus1" runat="server" Font-Size="10px" Width="37px" BorderStyle="Solid" BorderWidth="1px" BorderColor="White" LogoutText="" LogoutAction="RedirectToLoginPage" /></p></div></div></form></body></html>
Can someone please how to diagonis further or how to solve the issue. Its very painful situation now as I do not have anything in my mind to fix this. How to reduce this ASPNetPageRenderLeave time?
High CPU on all WordPress sites PHP7.4.5 IIS 10
IIS10
PHP 7.4.5
MySQL 8.0.1.9
2.6Hz
1 Socket
2 processors
Windows Server 2019
Hi,
On all my WordPress sites when I refresh the page 1 php-cgi.exe process is taking up half my CPU.
No errors in the php log file or front end
- My windows/temp has the correct permissions as it is storing opcache files and session files
- All WP Sites produce same result using around 50% per php-cgi.exe process
- Rolled back to php 7.1 and same result
Here are all my php.ini settings
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
zend.exception_ignore_args = On
expose_php = On
max_execution_time = 300
max_input_time = 180
memory_limit = 128M
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = Off
display_startup_errors = Off
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 64M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 64M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension_dir = "C:\Program Files\php-7.4.5\ext\"
error_log = "C:\WINDOWS\Temp\php-7.4.5_errors.log"
upload_tmp_dir = "C:\WINDOWS\Temp\"
cgi.force_redirect = 0
cgi.fix_pathinfo = 1
fastcgi.impersonate = 1
extension=bz2
extension=curl
extension=ffi
extension=ftp
extension=fileinfo
extension=gd2
extension=gettext
extension=gmp
extension=intl
extension=imap
extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli
extension=odbc
extension=openssl
extension=pdo_mysql
extension=pdo_odbc
extension=sqlsrv_74_nts_x64
extension=pdo_sqlsrv_74_nts_x64
extension=soap
extension=php_wincache.dll
zend_extension=php_opcache.dll
fastcgi.logging = 0
track_errors = Off
html_errors = Off
extension=sqlite3
extension=tidy
extension=xmlrpc
cli_server.color = On
date.timezone = "Europe/Minsk"
pdo_mysql.default_socket=
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = Off
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
bcmath.scale = 0
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.cookie_samesite =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
session.save_path = "C:\WINDOWS\Temp\"
zend.assertions = -1
tidy.clean_output = Off
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
ldap.max_links = -1
Would appreciate some ideas for speeding up this configuration please ?
Worker Process Crashed
Large number of awaiting requests on audit application pool which led to crash in pool as you will see many errors in the attached HTTP error log file.
- Connection Abandoned by ReqQueue on Audit App pool
- Connection Dropped on all application pools
503 “Service Unavailable” response
Web service\Current connection was 1200 during problem
I have some questions here if you could help me + i need to know the root cause
1- is there any explanation why restarting IIS twice and restarting the machine didn’t solve the problem.
2- we could split audit app pool but what if any pool has this this issue again .
3- how we can increase the requests and what is the queue length.
4- is this means that IIS was not hanged its only the audit pool and due to all services is auditing the whole IIS hanged.
5- why we couldn't see this report within the problem and how we could have health check on the pools for any service to be monitored and take corrective action before having the problem.
6- how splitting is not an answer as per below investigation IIS has a max requests and for sure increasing pools has also some precautions for single server , so splitting the machine for less resources maybe an answer.
7- how audit pool was the problem while it was the only pool working and sending emails that there is a problem in all services.
ResolveRequestCache is taking much time although i don't need it
I have a C# MVC application hosted in IIS performance testing environment with only one action method in APIController. Clients call this single method and depending upon the parameters different small processes are performed.
I am using IIS 10.0.17763. Application is built in .Net Framework 4.6
I have disabled all modules except the modules shown in attached screenshot. I have not included any such custom module which is working inside ResolveRequestCache.
The problem is that under load test from jmeter, all calls somehow stay longer in ResolveRequestCache State.
I am not able to find the problem behind the scene. Also I am not using any kind of caching due to business requirement.
Please suggest what could be the reason and what i should check for the solution.
IIS Worker Process (w3wp.exe) high memory
Hi Everyone!
On Windows Server 2012 R2 Datacenter. I running ASP.Net Application.
Performance SVR: Memory: 32Gb
I saw on Task Manager: IIS Worker Process(w3wp.exe) for My Application taking full Memory (~30Gb)
I think w3wp.exe no release.
Why is reason?
Help me check this!
Thank
C# loading an unmanaged DLL: big performance difference between console application and webapp on IIS
I have a webapp written in C#, based on ASP.NET. It loads (with LoadLibraryEx
) an unmanaged DLL written with C++Builder.
As I have performance issues I made some tests and comparisons, running always the same method in the DLL, for many times, obtaining average times.
I discovered that the DLL:
- loaded by a C++Builder console application, takes: 4.922 s
- loaded by a C# console application, takes: 5.484 s
- loaded by a minimal C# ASP.NET application hosted on IIS 7.5, takes: 9.551 s
As you see case 1 and 2 have very similar performance.
Why case 3 is so slow? Maybe IIS slows down the DLL?
Is there any suggested IIS tuning?
Is there any suggested fast alternative to IIS for hosting ASP.NET webapps?
Should I consider porting the webapp to C++Builder?
IIS 10 CPU throttling not working on WS 2019
We are running few websites on WS 2019 IIS 10. On one of these websites we applied CPU Limit: 35
But when I recycle app pool where this limitation is applied and try to access to site, CPU is exceeding 60% of available server performance on that app pool. Idk if I´m doing something wrong? Eventvwr is clear, no problems or errors with this limitation.
I know CPU is exceeding 60% on actual limited pool process because I enabled Command Line in Task Scheduler so I can see w3wp.exe with specific app pool.
Some ideas?
IIS won't serve static files larger than 10KB
Hi,
I'm facing a strange issue with IIS on windows 10.
No static files larger than 10KB are served.
Even if I go and try to open the http://localhost/ to see the iisstart.htm page, the iisstart.png is not loaded.
Error in Chrome: Failed to load resource: net::ERR_CONNECTION_RESET (after ~40 seconds of "pending")
No failed requests logged (trying to catch all errors from 401 to 999).
Not a Chrome issue as same happens in FireFox and Edge too.
Tried to reinstall IIS to no avail.
Frustrated. Need help.
Thank you in advance.
Viewing maximum number of IIS connections in perfmon
In IIS-10, I have set the `maximum concurrent connections` to 50, however, in the performance counters, I don't see that 50 for the related counters.
Which performance counter is related to this limit then?
confusion on tuning
We are tuning our IIS instances as we are running into CPU contention. We are using the following article as our guide:
https://docs.microsoft.com/en-us/troubleshoot/aspnet/performance-call-web-service
A deeper inspection of the documentation for the parameters called out in the above article shows a potential discrepancy with other documentation from Microsoft.
Based on the advice of the article with 12 CPUs, we should configure IIS as follows:
Recommended | |
CPUs | 12 |
MaxWorkerThreads | 100 |
MaxIOThreads | 100 |
MaxConnections | 144 |
MinFreeThreads | 1056 |
minLocalRequestFreeThreads | 912 |
minWorkerThreads | 50 |
The discrepancy lies in the documentation for the above parameters. For example, MaxWorkerThreads documentation (https://docs.microsoft.com/en-us/dotnet/api/system.web.configuration.processmodelsection.maxworkerthreads?view=netframework-4.8) says this:
The value of MaxWorkerThreads must be equal to or greater than the MinFreeThreads setting in the httpRuntime configuration section.
This contradicts the advice of the article at the top. Can you provide guidance?
NUMA and threading
Hello,
We are exploring moving our IIS servers to NUMA and setting workerprocesses to 0. However, our legacy machine.config has the following custom configuration settings. How should we tune these settings in a dynamic NUMA configuration?
<system.web> <processModel autoConfig="false" maxWorkerThreads = "100" maxIoThreads = "100" minWorkerThreads = "50" minIoThreads = "50"/> <httpRuntime minFreeThreads="1056" minLocalRequestFreeThreads="912"/>
Thanks!
.NET CLR LocksAndThreads\Queue Length / sec and locks
Hello,
What kind of locks within code would cause this counter to be affected? For example, would SQL locks contribute to this?
Thanks
IIS Application Pool Exceeding Memory Limit
I recently capped the maximum private memory in an IIS application pool to keep it from hogging system resources. Then the other day I caught the IIS worker process using far more ram than that. Why would a process use more RAM than the private memory limit and how do I stop it?
IIS 10 Windows server 2019 slow ftp high latency
Hello I have dedicated server with 1gbps of upload speed but I cant get over 10mpbs dowload speed from my client pc from ftp with iis 10. I have high letancy over 100ms. I know the problem is with window size but I cant edited from registry on windows server 2019. I have the autotuning at experimental. Could you help me with some solution.
Thank you
IIS https requests are 4-5 times slower than http, lsass.exe is consuming 40% CPU
We have an ASP.NET application running on IIS on Windows Server 2016, hosted on a D48s Azure virtual machine (48 cores).
Most of the time, the web app is processing requests from regular users at a pace of 200-300 requests per seconds.
But at times, the server receives high incoming traffic as webhooks from external sites –up to 1000-5000 requests per second.
When this happens, the CPU usage get really high, and we noticed that the Local Security Authority Process (lsass.exe) is consuming most of the CPU at that time: it can take up to 40-50% of the total CPU usage (the orange graph is lsass.exe CPU usage):
Needless to say, the server becomes really busy, and other requests start to slow down.
By the way, each webhook request is very lightweight and adds a record to a table in SQL Server, for later processing.
We made a load test on our server, and found out that lsass becomes so active only when requests are made using https. However, if the very same requests are made using http, lsass.exe is not active at all.
The second discovery was that when using http the server was able to process 4-5 times more requests under the same load, compared to https!
Here is a screenshot from Performance Monitor: the green line show Requests per seconds, and the brown line shows lsass.exe CPU usage. On the left is what happens when using http, and on the right – when using https:
So the bottom line is that:
1) https makes the requests 4-5 times slower.
2) When using https, lsass.exe starts to eat a lot of CPU resources.
Questions are:
1) Why is lsass.exe so active during https requests?
I found an article on the web saying that lsass.exe was used by IIS 6.0 to cipher / decipher https traffic, but that starting from IIS 7.0 it is no longer used. However, our experiments indicate the contrary.
I don't understand how 4000-5000 requests per seconds having a body of 3-5 kilobytes can make the the CPU of a 48-core server so busy.
2) Maybe there are some hidden SSL settings in IIS that can make https more efficient?
3) We found info on SSL offloading: can this be done on an Azure VM?
Update
We created a new Azure VM from scratch (a 32-core D32s), installed IIS and created a simple ASP.NET Web Forms app that has only 1 "Hello World" aspx page that does nothing (no SQL Server requests etc.)
With JMeter we created a load test to this page, and the same pattern appeared here:
1)http: the server was processing 20 000 requests per second, andlsass.exe was not active.
2) https: the server was processing only 1000-1500 requests per seconds, andlsass.exe was consuming 10% of total CPU.
Here is the Performance Minitor graph (http on the left, https on the right):
By the way, JMeter and the ASP.NET web app were run from the same VM, so network round-trips were minimal.
How can https be 15-20 times slower than http in this simple situation?
And what is the role of lsass.exe in this situation?
Performance very slown in pages C#
I have an application running in production developed in ASP.NET 4.6, the application to be published or at any time it takes approximately 1 min to load each page, I have already tested it on other Production servers and with less resources and the application
works perfectly.
I performed a query on an API to check the return time, and to bring 1 record took 700 milliseconds ...
Could anyone help?
In some cases I need to reset IIS several times until it returns to normal.