current position:Home>IIS WCF 808 port service access exception

IIS WCF 808 port service access exception

2022-06-24 12:44:38shawyang

A problem has been solved recently IIS+SqlServer Environmental ERP Software problems

The environment is relatively simple :IIS+SqlServer+ERP+ESET

In the system 3 A software :ERP、SqlServer(ERP need )、ESET( Consider the influence of independent variables of anti-virus protection software , It has been uninstalled. The problem remains )

Generally, when you can't visit , netstat -ano|findstr :808 see Established Of IP, Usually just a few , But there are a few connections compared to others IP More

Statistics 808 Number of built connections , use netstat -ano|findstr :808|find /c " Intranet IP:808"

such as netstat -ano|findstr :808|find /c "172.16.0.16:808"

The server configuration is high , All indicators are not very high , When you can't visit , some IP Always with 808 port Established There are many connections, but the number of connections at the server level is not a bottleneck , It mainly depends on ERP What are the special restrictions

If it's normal IIS Website , It is impossible to access eight or nine clients , There are some ERP There is a set meal 、 Special configuration and other restrictions , Every time you can't visit 808 Established The highest number IP It was restored after prohibition , Still doubt ERP What are the special configurations or limitations of the software , ask ERP The software side ,ERP People over there say they have more customers , I haven't encountered such a problem

because ERP The after-sales service of the software side can't keep up , It's hard to contact the software provider , I have to do my own research

1、wcf relevant 4 A service

2、wcf Related programs and configuration files

32 position :

C:\Windows\Microsoft.NET\Framework\v4.0.30319\SMSvcHost.exe

C:\Windows\Microsoft.NET\Framework\v4.0.30319\SMSvcHost.exe.config

64 position :

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SMSvcHost.exe.config

3、 performance tuning

① With the help of Microsoft information and consulting for Microsoft billing

https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/configuring-the-net-tcp-port-sharing-service

Found 1 Microsoft documentation for related scenarios , involve 2 Indicators :maxPendingAccepts and maxPendingConnections .

After that, I will send a bill to Microsoft to consult the best practices , Microsoft suggests :

maxPendingAccepts:5-10

maxPendingConnections :100-200

According to the Product Team, you shouldn't increase “maxPendingAccepts” too much. 5-10 would be a good number. It means it spawns 5-10 concurrent threads to pull connections.

Feel free to increase the maxPendingConnections value according to your needs (you can also set 1000, even though I'd wonder why if you needed so many connections. 100-200 can be considered a good choice).

Finally, it was adjusted to the following way, but it still didn't work , Problems still happen every day

https://docs.microsoft.com/en-us/archive/blogs/asiatech/modifying-smsvchost-exe-config-for-wcf-some-common-mistakes

https://docs.microsoft.com/en-us/archive/blogs/andreal/net-tcpip-port-sharing

② seek ERP Software support or best practice documentation , Unable to contact the software party , give up

③ Research ERP Software , It is IIS Running in the environment , Careful study IIS Environmental Science , Find out w3wp.exe Only 3 A process , Each corresponds to an application pool , this 3 The application pool is just the user's 3 Virtual sites , Learn from the user 3 The visit pressure of each station is different , Try to configure different application pools for different sites Maximum Worker Processes, It is found that the effect is obvious , Combined server CPU、 Memory 、 disk 、 The capability range and business performance of the network will finally 3 Of application pools Maximum Worker Processes Adjusted to a suitable value

The experience here is ,1 individual Worker Process Probably occupy 500MB Memory , Leave enough memory for the database and the operating system itself ,

Amount of memory left (MB)/ 500(MB)= n

Be safe n-1 Almost Maximum Worker Processes The value of the

Of course , If you really don't know how much to set , Then specify as 0 Under observation

iisreset /restart After the execution of the command , Generally in 5 Within minutes ,w3wp.exe The quantity of will change from 1 Gradually increase to all Worker Process The sum of the numbers , The total is... Of the application pool in use Maximum Worker Processes The sum of , It can be used powershell perform get-process w3wp | measure Statistics w3wp.exe A change in number .

Final , By calling the application pool Maximum Worker Processes Adjusted to a suitable value to solve the problem .

How to set the maximum number of working processes : According to each working process, it can carry 30 A concurrency principle is used to determine the maximum number of worker processes in the application pool . At the same time, pay attention to , Each work process will occupy approximately 500M Left and right system memory , When setting the maximum number of working processes , Do not exceed the maximum available memory of the system . In general , It is recommended to increase each time 5 The maximum number of worker processes is adjusted by the number of worker processes , After adjustment, observe the website for a period of time , If still unable to meet the requirements , Continue to increase 5 Number of worker processes .

copyright notice
author[shawyang],Please bring the original link to reprint, thank you.
https://en.chowdera.com/2022/175/20210526171256902x.html

Random recommended