Troubleshooting A fatal error occurred while fetching the update Error
An error stating A fatal error occurred while fetching the update may occur in the Automatic Updater modal window inside WHMCS. It will look like this:
This guide provides troubleshooting steps to identify and resolve the underlying causes of this message.
- Navigate to Utilities > System > PHP Info.
- Ensure the values set meet the minimum requirements for using the Automatic Updater.
Specific to the web server you are using, there are limitations that can be imposed by the web server that cause the Automatic Updater to be terminated before it's completed, resulting in the error above.
Some of the most common configurations that may cause this include:
- Apache TimeOut directive.
- LiteSpeed Connection Timeout.
- Nginx proxy_read_timeout.
- CloudLinux IO and IOPS limits.
Observing the server response with Network Analyser
Your browser's network analyser developer tool can be used to observe the raw response from the server response (in addition to your own server logs):
- Follow these steps to enable your browser's network analyser tool.
- Return to Utilities > Update WHMCS.
- Click Begin Update and follow the on-screen instructions to begin the update process.
- In the network analyser, select the
- Select the Response tab.
The network analyzer will now display the raw response from your server. This may confirm a PHP error or server timeout message.
Work with your server administrator or hosting provider to increase the relevant timeout. Then, attempt to use the Automatic Updater again.
Testing the length of execution for a PHP script
To check and confirm that PHP scripts can run until the WHMCS
defined max_execution_time of 300 seconds:
1. Download this
2. Upload it to your WHMCS directory.
3. Make a cURL request to that file. For example:
4. A successful test will, after 280 seconds (the defined value in the test script), yield a response similar to this:
shutdown function called after 281.08206486702 seconds.
Any other response indicates the script was terminated before 280 seconds:
- Internal Server Error — A general failure. Review the server error logs.
- No response likely indicates a PHP fatal error has occurred, like a lower
max_execution_timevalue exceeded by the script.
- Another HTTP error status code (504 for example).
It is necessary to work with your server administrator or hosting provider to determine why the
test_execution_time.php script is being terminated before 280 seconds and correct it.
test_execution_time.php script can run for 280 seconds, attempt to use the Automatic Updater again.
Applying the update via Command Line
Where it is not possible for the aforementioned limiting factors to be removed, applying the update via the Server Command Line will typically avoid timeout issues.
Follow all the steps in Updating WHMCS at the command line to complete the update process.