Optimizing Settings of Web Module
Posted by on 12 April 2013 05:02 AM
When should I Use this Tweak?
If your WebClient suffers from stability issues such as red-bars that read "connection lost", performance issues with timeouts caused by a huge PHP load or occasional Web module restarts, then it is probably time to review the Web server settings. The settings are accessible through the IceWarp Server Administration console. Tweaking settings can bring a huge performance and stability increase.
There are several places in the iceWarp Server Administration console where the related options are stored. First, navigate to the Web node and double-click the defined website in the General tab. Go to the Scripting tab and make sure all listed services are set to (fastcgi);php\php.exe. The first line, which is responsible for instant messaging, remains unchanged.
This means that instead of using ISAP (the default for version 9 and older) now we use FastCGI which is more powerful and runs PHP as a single process. It increases the stability considerably because if one of the php.exe processes crashes it is immediately replaced by another php.exe process and this action does not affect the stability of the Web module. The reason being is that it is not loaded as a single dll attached to the Web module and runs separately from now on.
The next step is to optimize some values in the webserver.dat file. You do not need to do this if you are running a fresh installation of version 10.3.x and higher as these values are already optimized. Incorrect values might appear with continuously upgraded installations of the IceWarp Server, this is because this file is not overwritten by these upgrades.
Go to the Web node and click Edit File located at the bottom of the General tab.
There are just few values we are interested in:
<FCGI_INITSERVERS>6</FCGI_INITSERVERS> – this variable tells us how many php.exe files should run after the Web service is started and there will never be less than six of them. Six is also the correct value for the variable.
<FCGI_THREADPOOL>15</FCGI_THREADPOOL> – this variable tells us whatthe maximum number of running php.exe files is. After a long time of testing in different environments, we found that 15 is the best number and all the setups we tested were capable to run such a number. A higher value can be quite demanding for the system resources and is not recommended.
<MODULE TITLE="[activesync]" THREADPOOL="-1"/> – this value shows how many threads can handle the active syncs requests – in this case "-1". The value is taken from the global thread pool which is set via API console.
This is how we get to one of the most important changes, the global thread pool should be unlimited to make ActiveSync and instant messaging run smoothly. As mentioned before, this can be set via API console. The appropriate variable is c_webservice_appmaxthreads and is to be set to 0 (zero).
Now just restart the Web module and the tweaking is done.The correct values of webserver.dat for the main variables:
<MODULE TITLE="[activesync]" TIMEOUT="1800000"/>
<MODULE TITLE="[activesync]" THREADPOOL="-1"/>
<LOGFORMAT>c-ip cs-username date time cs-method cs-uri-stem cs-version sc-status bytes cs(Referer) cs(User-Agent)</LOGFORMAT>