- Plesk Onyx for Windows
A lot of customers uses high memory amount for its IIS Worker Process.
How to limit those customers to eg. 128MB?
In Plesk it is possible to do the basic IIS memory limits managing in
Tools & Settings > IIS Application Pool
for the global application pool.
In this menu it is possible to set:
- Recycling when the maximum amount of virtual memory is used
- Recycling when the maximum amount of private memory is used
This is the default option for IIS - recycle the pool when the maximum amount of memory was reached.
It is possible to configure memory limits for multiple domains by adjusting assigned service plan:
- Go to Service Plan > service_plan_name > Performance tab
- Set required values for aforementioned options
application pool settings for single domain can be updated via CLI
. The command below set mentioned application pool parameters to 128MB for
- Log in to the server via RDP
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
To apply new limits application pool have to be re-cycled manually as below or automatically by timeout:
C:\> "C:\Windows\SysWOW64\inetsrv\appcmd.exe" recycle apppool /apppool.name:"example.com(domain)(4.0)(pool)"
Additional useful information can be found here: https://serverfault.com/questions/167851/how-to-limit-the-memory-used-by-an-application-in-iis