Question
A lot of customers uses high memory amount for its IIS Worker Process.
How to limit those customers to eg. 128MB?
Answer
In Plesk it is possible to do the basic IIS memory limits:
Click on a section to expand
Server-wide for the global application pool
Go to Tools & Settings > IIS Application Pool:
In this menu it is possible to set:
- Recycling at regular time intervals (minutes)
- Recycling when the maximum number of requests is reached
- Recycling when the maximum amount of virtual memory is used
- Recycling when the maximum amount of private memory is used
Default option for IIS is recycle the pool when the maximum amount of memory was reached.
Click on a section to expand
For multiple domains by adjusting assigned service plan
- Go to Service Plan > service_plan_name > Performance tab
-
Set required values for the options below:
- Recycling at regular time intervals (minutes)
- Recycling when the maximum number of requests is reached
- Recycling when the maximum amount of virtual memory is used
- Recycling when the maximum amount of private memory is used
Click on a section to expand
Managing application pool settings via CLI
The command below set mentioned application pool parameters to 128MB for
:
example.com
- Log in to the server via RDP
Note: if direct RDP access to the server is not possible, contact server administrator for further assistance.
- Execute the following command in command prompt
C:> plesk bin site.exe --set-iis-app-pool-settings example.com -iis-app-pool-turned-on true -recycling-by-virtual-memory 131072 -recycling-by-private-memory 131072
Note: Values for memory limits set in kilobytes
Note: The changes will be reflected in Plesk database, in iisapppools table, where iisapppools.ownerId refers to domain's ID.
- To apply new limits application pool have to be re-cycled manually as below or automatically by timeout:
C:> "C:WindowsSysWOW64inetsrvappcmd.exe" recycle apppool /apppool.name:"example.com(domain)(4.0)(pool)"
Additional information can be found in Plesk Documentation