To achieve a good website performance, it is crucial to optimize the number of executions. The most common cause for an excessively high number of executions is either something irregular happening to your website that should be addressed and stopped or in the better case a legitimate peak in your website traffic, which can also be addressed and handled.
What is execution?
A simple example of execution is when a visitor opens your website and your index PHP file is loaded. This counts as one execution. The more visitors your website has, the more executions it will generate. Note that this is valid only for dynamically generated content. If you open a picture or an HTML page, a new execution will not be generated on the server. Executions are counted for the following scripting languages – PHP, Perl, Python, Ruby, etc.
Using Bandwidth tool to identify irregularities that cause a high number of executions
To reduce the number of executions generated by your website, you have to identify the source of the issue. Sometimes the high number of executions is not created by a high number of legitimate visitors, and you may be able to lower it by taking some corrective actions. The best way to do this on an Eltris hosting account, go to Client Area > select an active hosting subscription > cPanel > Bandwidth.
The Bandwidth tool provides you with useful information about which part of your website is most viewed. You should check this section to identify the pages that generate the executions. Below, we will talk about the most common execution generators:
- Chat/calendar or other modules that refresh their content constantly can generate many executions, and you will be able to see the executions in this section. For example, if your site uses a calendar module, and you see that the calendar.php script has been accessed many times, then it is a good idea to disable this module.
- Application login pages. Very often, sites are abused by bots that try to gain administrative access. If you see many requests to your site’s admin login page (Joomla! administrator folder, WordPress wp-admin.php, etc.) you can do two things:
- Password protect your administrative folder
- Allow access only from certain IP addresses by adding simple .htaccess rules.
- Comments sections. Very often, sites are abused by bots that try to post spam comments. If you see many requests to your site’s comments section (WordPress wp-comments.php, Joomla! JComments, etc.) then add CAPTCHA that will show an image to your visitors before allowing them to post a comment to prevent bot’s requests. There are many CAPTCHA extensions for WordPress, Joomla!, Drupal, etc. that you can use to protect your site’s comments section/contact forms.
As you probably know, search engines use bots to index websites on the Internet. Those visits to your website are recorded and shown in the Behaviour tab. Sometimes bots generate too many executions, and you need to either block the bots or decrease their crawl rate. If you notice too many requests from certain bots, then you can change their crawl rate. The way you set the crawl rate depends on the particular bot.