Performance Settings
Even though we strive to make our framework as performing as possible, you can manage some settings yourselves because they are either out of our hands or dependent on the kind of solution you are building.
IIS Site Idle Time-out
Together with the application pool recycling settings, this will have an impact on the duration of the very first calls of ADM on a working day. By default the IIS site idle time-out is 20 minutes. This means that after 20 minutes, an IIS site will go into sleeping mode and needs to wake up again. It's the "waking up" process that causes major delays on calls from ADM.
Ensuring that the IIS sites are always awake, raise the setting to 1740 minutes (29 hours, the default for app pool recycling).
The setting can be found in the Advanced Settings
section of an IIS site. Do this for all IIS sites related to the Ometa Software Suite.
IIS Application Pool Recycling
An IIS application pool is set to recycle every 29 hours. The recycling process ensures that any memory leak we are unaware of can't cause a server crash and also frees up memory that is currently allocated to cached data.
The default configuration of a 29 hour interval means that a recycle might happen during a peak in your production environment. This means that users requesting data during the recycle or immediately after it will have a severe performance penalty. This penalty is the same as the penalty caused by the site idle time-out setting because the Windows process for the IIS site should be started again.
To improve this, we will configure a default recycling time instead of an interval and schedule a job in the framework that will start the Windows process for the IIS site immediately after the recycle.
Step 1: Setting the Recycling Time
- Pick a time at which you are going to set as the recycle time. Ensure that no scheduled tasks (synchronizations, method jobs, Windows scheduled tasks, ...) can interfere at the chosen time.
- For each application pool related to the Ometa Software Suite, open
Recycling...
. Uncheck the interval checkbox and set a specific time. In the example below, we set this to 3 am as our service isn't doing anything at that time.
Save the changes.
Step 2: Dummy Call to the Services
Sending a dummy call to the services will awaken them. Because of the idle time-out set to 29 hours, the services will remain active during the rest of the day.
Create a batch file somewhere on the disk with the following contents. This will call the four Ometa IIS sites on their root (use the urls that apply to your services):
curl -s -o nul https://myauthorityservice:port curl -s -o nul https://mybamportal:port curl -s -o nul https://mycoreservice:port curl -s -o nul https://mygenericrestservice:port
In the Ometa Software Suite, create a new object called
KeepAlive
(you can change this name if you'd like).- Inside the object, create a new method
Awaken IIS Services
(you can change this name if you'd like). - Set the template of the method to
OS
. - Set the interface script of the method to the full path of the batch script.
- Ensure that you have an OS profile that this method can be executed on.
- Go to the
Method Jobs
tab of the Ometa Business Connector Configurator. - Create a new method job called
Awaken IIS Services
(you can change this name if you'd like). Configure the method you just created as the
Method Settings
Create a schedule to run every day, 1 minute after the configured recycling time in step 1.
Save all the changes.
After setting both the IIS site idle time-out and application pool recycling scheme, together with the scheduled job, the IIS sites of the Ometa Software Suite will always be available and ready to respond to any incoming requests.