You encounter the following error and it is not resolved even after recreating the OSCE server's virtual directory:
HTTP Error 503.2 - Service Unavailable
The serverRuntime@appConcurrentRequestLimit setting is being exceeded
The most likely causes are the following:
- In Internet Information Services (IIS):
- The setting is too low.
- The applicaiton is taking too long for the current load.
- In OSCE, the issue might appear after doing the following procedures:
- Rebuilding the OSCE server
- Upgrading the OSCE server to a new patch
- Migrating the OSCE server
- The Internet Information Services (IIS) Logs are full
Check the size of ofcserver.ini file under the \PCCSRV\Private folder.
If the file size is much smaller than 40KB (e.g. just around 1KB), we would consider this is a file corruption issue.
Follow the steps provided in the following KB article: Recovering a server from a corrupt ofcserver.ini file in OfficeScan (OSCE) to recover the file.
If the database is in codebase mode, rebuild a new empty database and check if the issue can be fixed.
- Create a backup of ..\Program Files\Trend Micro\Officescan\PCCSRV\HTTPDB.
- Delete the contents of ..\Program Files\Trend Micro\Officescan\PCCSRV\HTTPDB.
- Restart the OfficeScan Master Service.
- Wait until the agents report back to the OfficeScan server.
It is suggested to migrate the database from codebase mode to SQL Server for more stable performance and better experience.
Optimize some configurations of OfficeScan server.
Back up and edit the ofcscan.ini file on the OfficeScan server and add the following Max Buffer and thread number setting:
[INI_SERVER_SECTION] Max_Event_Buffer=3000 Max_Log_Buffer=3000 Command_Handler_Static_Thread_Number=80 Command_Handler_Maxium_Thread_Number=80 [INI_DBFILE_SECTION] DB_MEM_OPT_MAX = 102400 DB_ENFORCE_DBFLUSH_PERIOD=86400 Change the value of DB_ENFORCE_DBFLUSH_PERIOD to 86400 which means doing it per day.
- Enlarge the interval of the heartbeat settings from OSCE web console if possible.
- Open the Internet Information Services (IIS) Manager and select the server on which you want to perform this procedure.
- Click Application Pools in the left pane, select the OfficeScanAppPool which OfficeScan server is using from the list in the center pane, and then click Advanced Settings… in the right pane. Then the Advanced Settings dialog box appears.
On the Advanced Settings dialog box, make the following changes:
- Change the value of the parameter Queue Length to 65535.
- Change the value of the parameter Maximum Worker Processes to 5 or more.
Enlarge AppConcurrentRequestLimit via CMD:
From the OSCE server, open CMD:
Type the following:
appcmd.exe set config /section:system.webserver/serverRuntime /appConcurrentRequestLimit:100000
To verify this change, open the file: %systemroot%\System32\inetsrv\config\applicationHost.config, and then verify the value of parameter serverRuntime appConcurrentRequestLimit, which should be 100000:
Set MaxUserPort to 65534.
Add the following entries in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters registry hive:
TcpTimedWaitDelay = 30
TCPTimedWaitDelay is in seconds. This determines the time that must elapse before TCP can release a closed connection and reuse its resources.
MaxUserPort = 65534
MaxUserPort determines the highest port number TCP can assign when an application requests an available user port from the system.
- Back up and remove the IIS logs. The default location is %SystemDrive%\inetpub\logs\LogFiles.
After these changes have been made, stop and start the following services:
- Stop OfficeScan Master Service .
- Stop IIS Service.
- Stop World Wide Web Publishing Services.
- Start World Wide Web Publishing Services.
- Start IIS Service.
- Start OfficeScan Master Service.
Check if the issue can be fixed.
If the issue persists, collect the following for further investigation and send the logs to Trend Micro Technical Support:
- CDT debug logs
- IIS logs
- ofcservice.exe dump (if available)