What is an Entry Process and what does the limit mean?
One of the limits InfinityFree enforces is the Entry Process limit. This article explains what an entry process is, what the limit means and how you can control it.
What is an entry process?
Every time a request to a PHP script on your website is made, a new program is started to execute your PHP code. Starting and running this program takes a little bit of server power every time a request comes in. These entry processes stay active until the PHP script has finished executing. After that, the entry process will quit.
Note that one entry process is created for every request, not every PHP file. So if your code includes multiple PHP files, these still count as one entry process.
What is the entry process limit?
There are two factors which determine your entry process usage:
- How many entry processes are created for your account?
- How long do the entry processes stay active?
The entry process limit is closely related to the CPU usage limit. The Entry Processing limit measures how long your PHP scripts are running, the CPU usage limit measures what your scripts do when they are running.
The exact way the entry process usage is calculated and is rather complicated. Additionally, you should stay within the limit and not try to optimize your website to use as much processing power as possible without hitting the limit.
Because of that, the exact method the entry process usage is calculated is confidential. InfinityFree also cannot give you a definitive number on how much entry processes your account can use.
If you hit the entry process limit, your account will be disabled for 24 hours, after which it will be reactivated automatically.
Why is my entry process usage high?
In practice, the following factors are relevant to your entry process usage:
- Your website gets a lot of requests to PHP scripts.
- The PHP scripts stay active very long. This can be caused by your code doing lots of calculations, or because it has to wait for a slow database query or slow external API.
How do I reduce my entry process usage?
Here are some recommendations which may help to reduce your entry process limits.
- Ensure static files (like HTML or CSS files) don’t have the
.phpfile extension. All requests to files with the
.phpextension generate entry processes, even if there is no actual PHP code in the file.
- Remove unnecessary plugins and scripts from your website. The less code is being executed on your website, the less time it generally needs to generate a response (which means the entry process quits faster).
- Install caching on your website, to help ensure code is executed fewer times.
The tips above don’t work for me, how do I keep my website online?
If your entry process usage is still too high after following the recommendations above (or you are having trouble applying the tips to your website), please consider to upgrade your account to premium hosting.
With premium hosting, the entry process limits are far higher than with free hosting, so your website can continue to grow. Add to that the other great features of premium hosting, like free SSL certificates, Cloudflare RailGun and an award winning cloud hosting platform, and you can be sure your website will stay fast and reliable.