waqas_18 Posted July 25, 2017 Share Posted July 25, 2017 Cron job of my WHMCS has stopped working, it executes but no automatic action is performed. I always receive an email with the following content: ============================== <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Oops!</title> <style> body { margin: 30px 40px; background-color: #f6f6f6; } .error-container { padding: 50px 40px; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 14px; } h1 { margin: 0; font-size: 48px; font-weight: 400; } h2 { margin: 0; font-size: 26px; font-weight: 300; } a { color: #336699; } p.back-to-home { margin-top: 30px; } p.debug{ padding: 20px 0px; font-family: "Courier New", Courier, monospace, serif; font-size: 14px; } .info { border: solid 1px #999; padding: 5px; background-color: #d9edf7; } </style> </head> <body> <div class="error-container"> <h1>Oops!</h1> <h2>Something went wrong and we couldn't process your request.</h2> <p>Please go back to the previous page and try again.</p> </div> </body> </html> ============================== When run cron force via command line showing same error: ================== php /home/billingw/crons/cron.php all --force -vvv WHMCS Automation Task Utility: all ================================== Daily Cron Automation Mode Queuing Tasks ------------- Force run any tasks: ignore "in progress" and "is due" Task queues ready Executing Application Queue --------------------------- 0/22 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 20.2 MiB Currency Exchange Rates Product Pricing Updates 2/22 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 9% < 1 sec/< 1 sec 20.2 MiB Invoices Late Fees 4/22 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░] 18% 2 secs/11 secs 21.0 MiB Credit Card Charges Invoice & Overdue Reminders <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Oops!</title> <style> body { margin: 30px 40px; background-color: #f6f6f6; } .error-container { padding: 50px 40px; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 14px; } h1 { margin: 0; font-size: 48px; font-weight: 400; } h2 { margin: 0; font-size: 26px; font-weight: 300; } a { color: #336699; } p.back-to-home { margin-top: 30px; } p.debug{ padding: 20px 0px; font-family: "Courier New", Courier, monospace, serif; font-size: 14px; } .info { border: solid 1px #999; padding: 5px; background-color: #d9edf7; } </style> </head> <body> <div class="error-container"> <h1>Oops!</h1> <h2>Something went wrong and we couldn't process your request.</h2> <p>Please go back to the previous page and try again.</p> </div> </body> ================== 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted July 25, 2017 Share Posted July 25, 2017 Hey waqas_18, Thanks for your post, could you please go into your WHMCS Control Panel then go into Setup > General Settings > Other and enable Display Errors & Log Errors Once done please re-execute the cron using php /home/billingw/crons/cron.php all --force -vvv 0 Quote Link to comment Share on other sites More sharing options...
waqas_18 Posted July 26, 2017 Author Share Posted July 26, 2017 Here is command output: Daily Cron Automation Mode Queuing Tasks ------------- Force run any tasks: ignore "in progress" and "is due" Task queues ready Executing Application Queue --------------------------- 0/22 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 20.5 MiB Currency Exchange Rates Product Pricing Updates 2/22 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░] 9% < 1 sec/< 1 sec 20.5 MiB Invoices Late Fees 4/22 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░] 18% 1 sec/6 secs 21.2 MiB Credit Card Charges Invoice & Overdue Reminders Fatal error: Maximum execution time of 300 seconds exceeded in /home/user/public_html/vendor/tecnickcom/tcpdf/tcpdf.php on line 7293 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Oops!</title> <style> body { margin: 30px 40px; background-color: #f6f6f6; } .error-container { padding: 50px 40px; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 14px; } h1 { margin: 0; font-size: 48px; font-weight: 400; } h2 { margin: 0; font-size: 26px; font-weight: 300; } a { color: #336699; } p.back-to-home { margin-top: 30px; } p.debug{ padding: 20px 0px; font-family: "Courier New", Courier, monospace, serif; font-size: 14px; } .info { border: solid 1px #999; padding: 5px; background-color: #d9edf7; } </style> </head> <body> <div class="error-container"> <h1>Oops!</h1> <h2>Something went wrong and we couldn't process your request.</h2> <p>Please go back to the previous page and try again.</p> <p class="debug">exception 'Whoops\Exception\ErrorException' with message 'Maximum execution time of 300 seconds exceeded' in /****/*****/public_html/vendor/tecnickcom/tcpdf/tcpdf.php:7293<br /> Stack trace:<br /> #0 /home/user/public_html/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(1, 'Maximum executi...', '/home/user/...', 7293)<br /> #1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown()<br /> #2 {main}</p></div> </body> 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted July 27, 2017 Share Posted July 27, 2017 Alright, it looks like this is the issue: <p class="debug">exception 'Whoops\Exception\ErrorException' with message 'Maximum execution time of 300 seconds exceeded' in /****/*****/public_html/vendor/tecnickcom/tcpdf/tcpdf.php:7293<br /> Something is causing the PDF to time out, start by lifting the PHP execution time to 600 seconds, and possibly re-uploading the whole /vendor folder 0 Quote Link to comment Share on other sites More sharing options...
waqas_18 Posted July 27, 2017 Author Share Posted July 27, 2017 I set PHP execution time 400 to 600 and re-upload /vendor folder but still same issue. 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted July 31, 2017 Administrators Share Posted July 31, 2017 Hi, Do you have any customisation to /templates/*your active template*/invoicepdf.tpl? Try moving aside your /assets/img/logo.png or logo.jpg file temporarily. Either of these could increase the PDF filesize as such that generating a lot causes the max execution time to be reached. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.