Knowledge Base
Categories: Set Up & Manage WHMCS
Fix WHMCS Cron Memory Error in cPanel
When a WHMCS scheduled task fails due to server memory limits in your cPanel environment. This article explains how to adjust settings to resolve memory issues during cron jobs.
You may receive the below email or a similar error within WHMCS regarding the failure of the daily WHMCS cron job.
Error
WHMCS cron error: mmap() failed: [12] Cannot allocate memory.
Reason for Error
- The daily WHMCs cron job under /home/username/whmcsdata/crons/cron.php is scheduled to run every 15 minutes.
- We have a maximum memory_limit of 256 MB on our shared servers per account.
- The WHMCS cron performs a number of activities and the memory footprint of the cron can be lowered by skipping the WHMCS update check.
To fix the Error
You may modify the command to the below mentioned command:
php -q /home/username/whmcsdata/crons/cron.php -vvv skip --CheckForWhmcsUpdate
You can modify the Command by following these steps
- Login to your cPanel
- Under Advanced > Cron Jobs
- Navigate to the above Cron Job and click on Edit.
Additional Resources
You may refer the links below:
NOTE
You can check for WHMCS updates manually from Utilities>WHMCS Update and clicking the Check for Updates button.
For any further queries, you can contact our 24/7 support team through the desired channel.
Did you find this article helpful?