Jump to content

Occasional CRON fail. Notification from Email.


netnow

Recommended Posts

Occasionally, (I can't specify how many times in a given time period we get these), but we do occasionally see an email:

-------------------------------------------------------------------------------------------------------------------------------------

  [Illuminate\Database\QueryException]                                                                                                                  

  SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `tbltask_status` where (`task_id` = 14) limit 1) 

[PDOException]                                                                   

SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared 

   all [-F|--force] [--email-report [EMAIL-REPORT]]

---------------------------------------------------------------------------------------------------------------------------------------

I have 'checked' database status with the WHMCS portal tool, and it shows all is good.

In a seperate email, I also get a bunch of html that appears to be specifying what is failing, although I cant definitively say the emails are related:

(I see another user has a similar thread open).

---------------------------------------------------------------------------------------------------------------------------------------

<!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>If the problem persists, please <a href="mailto:<REDACTED>@<REDACTED>.com">contact us</a>.</p>
    <p class="back-to-home"><a href="http://<REDACTED>.<REDACTED>.com/portal">&laquo; Back to Homepage</a></p>
    
    <p class="debug"><br/>PDOException: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared in /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:335<br /> Stack trace:<br />
#0 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(335): PDOStatement->execute(Array)<br />
#1 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select * from `...', Array)<br />
#2 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure))<br />
#3 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))<br />
#4 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select * from `...', Array, true)<br />
#5 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect()<br />
#6 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(624): Illuminate\Database\Query\Builder->get(Array)<br />
#7 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(316): Illuminate\Database\Eloquent\Builder->getModels(Array)<br />
#8 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array)<br />
#9 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Task/UpdateDomainExpiryStatus.php(0): Illuminate\Database\Eloquent\Model::all()<br />
#10 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(497): WHMCS\Cron\Task\UpdateDomainExpiryStatus->__construct(Array)<br />
#11 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Database\Eloquent\Model->newInstance(Array, true)<br />
#12 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): WHMCS\Scheduling\Task\Collection->filterToTasks(Array)<br />
#13 /home/<REDACTED>/public_html/portal/vendor/illuminate/support/Collection.php(208): WHMCS\Scheduling\Task\Collection->__construct(Array)<br />
#14 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Support\Collection->filter(Object(Closure))<br />
#15 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): WHMCS\Scheduling\Task\Collection->isLevel(32)<br />
#16 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Application.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->addTasksAsOptions(Object(WHMCS\Cron\Console\Command\SkipCommand))<br />
#17 /home/<REDACTED>/public_html/portal/vendor/symfony/console/Application.php(90): WHMCS\Cron\Console\Application->getDefaultCommands()<br />
#18 /home/<REDACTED>/portaldata/crons/cron.php(0): Symfony\Component\Console\Application->__construct('WHMCS Automatio...', '7.8.3-release.1')<br />
#19 {main}<br />
Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `tbldomainpricing` order by `tbldomainpricing`.`order` asc, `tbldomainpricing`.`id` asc) in /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:713<br /> Stack trace:<br />
#0 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure))<br />
#1 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure))<br />
#2 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select * from `...', Array, true)<br />
#3 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect()<br />
#4 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(624): Illuminate\Database\Query\Builder->get(Array)<br />
#5 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(316): Illuminate\Database\Eloquent\Builder->getModels(Array)<br />
#6 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array)<br />
#7 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Task/UpdateDomainExpiryStatus.php(0): Illuminate\Database\Eloquent\Model::all()<br />
#8 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(497): WHMCS\Cron\Task\UpdateDomainExpiryStatus->__construct(Array)<br />
#9 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Database\Eloquent\Model->newInstance(Array, true)<br />
#10 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): WHMCS\Scheduling\Task\Collection->filterToTasks(Array)<br />
#11 /home/<REDACTED>/public_html/portal/vendor/illuminate/support/Collection.php(208): WHMCS\Scheduling\Task\Collection->__construct(Array)<br />
#12 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Support\Collection->filter(Object(Closure))<br />
#13 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): WHMCS\Scheduling\Task\Collection->isLevel(32)<br />
#14 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Application.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->addTasksAsOptions(Object(WHMCS\Cron\Console\Command\SkipCommand))<br />
#15 /home/<REDACTED>/public_html/portal/vendor/symfony/console/Application.php(90): WHMCS\Cron\Console\Application->getDefaultCommands()<br />
#16 /home/<REDACTED>/portaldata/crons/cron.php(0): Symfony\Component\Console\Application->__construct('WHMCS Automatio...', '7.8.3-release.1')<br />
#17 {main}</p>
</div>
</body>
</html>

ANy ideas on what/how to fix?

Do we need to worry about data?

-N

 

 

Link to comment
Share on other sites

16 hours ago, netnow said:

ANy ideas on what/how to fix? 

for something like this, you may be better off opening a ticket with Support..

there was a similar thread a a couple of years ago, but there was no resolution to it posted...

16 hours ago, netnow said:

Do we need to worry about data?

not necessarily, but with your other thread, i'd certainly suggest getting to the bottom of who created the second database.

Link to comment
Share on other sites

I used softaculous to duninstall the original version, then install the 7.8 version. I am using the original database and config file as there was data in it I needed to keep. I suspect during the reinstall softculous created the new database. (which even right now is completely empty).

 

Link to comment
Share on other sites

19 hours ago, netnow said:

I used softaculous to duninstall the original version, then install the 7.8 version. I am using the original database and config file as there was data in it I needed to keep. I suspect during the reinstall softculous created the new database. (which even right now is completely empty).

oh in that case, and especially if the database has no tables and isn't being used, then it should be safe to delete.

PS you won't believe the number of horror installs i've had to deal with after users have installed using Softaculous! 😲

Link to comment
Share on other sites

Brian, 

Sorry to hear. My partner is a Softaculous fan. Me not so much.

If the next "WHMCS" upgrade does not work correctly, I will be looking for a source tarball somewhere and install by hand. 

The new unused database does have tables, but no data, and I had never added the new database name to the configuration.php so I am confident there is no data in it anywhere, other than an entry for the default admin, which already exists in the old (currently used) database.

I am still getting these failure notices every 4 hours. My concern at this point it minimal, as everything else in the WHMCS seems to be working. I do have DOMAINS and PAYMENT Gateway in Test mode, So I am guessing it may be possible that the domains 4 hour updates have an element that is failing causing the emails. 

I also have /portal/ .htaccess protected allowing our IP only, do you think this may be causing the errors?

Would WHMCS license checking and renewal be affected but .htaccess restrictions?

Here is todays 4:30 PM Fail:

<!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>If the problem persists, please <a href="mailto:<REDACTED>@<REDACTED>.com">contact us</a>.</p>
    <p class="back-to-home"><a href="http://<REDACTED>.<REDACTED>.com/portal">&laquo; Back to Homepage</a></p>
    
    <p class="debug"><br/></p>
</div>
</body>
</html>

Link to comment
Share on other sites

Sounds Good, Will give it a try ...

OK I did the enabling of the logging, ran the exact cron job at the command line, so I assume if there were errors they would be logged ... but where?

--------------------------------

I also re ran the cron using the command line verbose outputting. Got this:
(looked OK to me).
 

[root@<REDACTED> <REDACTED>]# /opt/cpanel/ea-php71/root/usr/bin/php -q /home/<REDACTED>/portaldata/crons/cron.php all -F -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/30 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0% < 1 sec/< 1 sec 18.0 MiB
 Currency Exchange Rates
  1/30 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   3%  1 sec/30 secs 18.0 MiB
 Product Pricing Updates
  2/30 [▓░░░░░░░░░░░░░░░░░░░░░░░░░░░]   6%  1 sec/15 secs 18.0 MiB
 Invoices
  3/30 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░]  10%  1 sec/10 secs 18.0 MiB
 Late Fees
  4/30 [▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░]  13%  1 sec/8 secs 18.0 MiB
 Credit Card Charges
  5/30 [▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░]  16%  1 sec/6 secs 18.0 MiB
 Invoice & Overdue Reminders
  6/30 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░]  20%  1 sec/5 secs 18.0 MiB
 Domain Renewal Notices
  7/30 [▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░]  23%  1 sec/4 secs 18.0 MiB
 Cancellation Requests
  8/30 [▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░]  26%  1 sec/4 secs 18.0 MiB
 Overdue Suspensions
  9/30 [▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░]  30%  1 sec/3 secs 18.0 MiB
 Overdue Terminations
 10/30 [▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░]  33%  1 sec/3 secs 18.0 MiB
 Fixed Term Terminations
 11/30 [▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░]  36%  1 sec/3 secs 18.0 MiB
 Inactive Tickets
 12/30 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]  40%  1 sec/3 secs 18.0 MiB
 Prune Ticket Attachments
 13/30 [▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░]  43% 2 secs/5 secs 18.0 MiB
 Delayed Affiliate Commissions
 14/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░]  46% 2 secs/4 secs 18.0 MiB
 Affiliate Reports
 15/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]  50% 2 secs/4 secs 18.0 MiB
 Email Marketer Rules
 16/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░]  53% 2 secs/4 secs 18.0 MiB
  SSL Sync
 17/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░]  56% 45 secs/1 min  18.0 MiB
 Credit Card Expiry Notices
 18/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░]  60% 46 secs/1 min  18.0 MiB
 Server Usage Stats
 19/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░]  63% 46 secs/1 min  22.0 MiB
 Overage Billing Charges
 20/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░]  66% 46 secs/1 min  22.0 MiB
 Client Status Update
 21/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]  70% 46 secs/1 min  22.0 MiB
 Domain Expiry
 22/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░]  73% 46 secs/1 min  22.0 MiB
 Ticket Escalation Rules
 23/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░]  76% 46 secs/1 min  22.0 MiB
 Data Retention Pruning
 24/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░]  80% 46 secs/58 secs 22.0 MiB
 Update Server Usage
 25/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░]  83% 47 secs/56 secs 22.0 MiB
 Update Server Meta Data
 26/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░]  86% 47 secs/54 secs 22.0 MiB
 Run Jobs Queue
 27/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░]  90% 47 secs/52 secs 22.0 MiB
 WHMCS Updates
 28/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░]  93% 49 secs/53 secs 30.0 MiB
 Domain Transfer Status Synchronisation
 29/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░]  96% 49 secs/51 secs 30.0 MiB
 Domain Status Syncronisation
 30/30 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 50 secs/50 secs 30.0 MiB


 Sending Daily Cron Digest email

Executing System Queue
----------------------

 4/4 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 21 secs/21 secs 36.0 MiB


 [OK] Completed

If THIS (below) is the "Digest email" mentioned above, then it is whats failing. I DID get it OK when I ran the verbose command above. 

image.png.74b9c2bd1dc055e072db91002fccf2e1.png

Link to comment
Share on other sites

Nope, The daily run isn't whats causing the failed html output emails. I am getting the daily emails no problem, identical to the ones above.

I still suspect it has something to do with domain status updates....

In case I haven't mentioned, PAYMENT and DOMAIN modules are both in test mode.

-N

Link to comment
Share on other sites

Well, in the root users error log I was able to find this, which I suppose is the same ish as the original post. Certainly an sql error, but why?

[11-Nov-2019 16:30:01 America/Toronto] [WHMCS Application] ERROR: PDOException: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared in /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:335 Stack trace: #0 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(335): PDOStatement->execute(Array) #1 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(706): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select * from `...', Array) #2 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure)) #3 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure)) #4 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select * from `...', Array, true) #5 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect() #6 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(624): Illuminate\Database\Query\Builder->get(Array) #7 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(316): Illuminate\Database\Eloquent\Builder->getModels(Array) #8 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array) #9 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Task/UpdateDomainExpiryStatus.php(0): Illuminate\Database\Eloquent\Model::all() #10 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(497): WHMCS\Cron\Task\UpdateDomainExpiryStatus->__construct(Array) #11 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Database\Eloquent\Model->newInstance(Array, true) #12 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): WHMCS\Scheduling\Task\Collection->filterToTasks(Array) #13 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\Collection->__construct(Array) #14 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(325): WHMCS\Scheduling\Task\AbstractTask->newCollection(Array) #15 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array) #16 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): Illuminate\Database\Eloquent\Model::all() #17 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->allTasks() #18 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Application.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->addTasksAsOptions(Object(WHMCS\Cron\Console\Command\DoCommand)) #19 /home/<REDACTED>/public_html/portal/vendor/symfony/console/Application.php(90): WHMCS\Cron\Console\Application->getDefaultCommands() #20 /home/<REDACTED>/portaldata/crons/cron.php(0): Symfony\Component\Console\Application->__construct('WHMCS Automatio...', '7.8.3-release.1') #21 {main}  Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `tbldomainpricing` order by `tbldomainpricing`.`order` asc, `tbldomainpricing`.`id` asc) in /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:713 Stack trace: #0 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(669): Illuminate\Database\Connection->runQueryCallback('select * from `...', Array, Object(Closure)) #1 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php(342): Illuminate\Database\Connection->run('select * from `...', Array, Object(Closure)) #2 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1583): Illuminate\Database\Connection->select('select * from `...', Array, true) #3 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Query/Builder.php(1569): Illuminate\Database\Query\Builder->runSelect() #4 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(624): Illuminate\Database\Query\Builder->get(Array) #5 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(316): Illuminate\Database\Eloquent\Builder->getModels(Array) #6 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array) #7 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Task/UpdateDomainExpiryStatus.php(0): Illuminate\Database\Eloquent\Model::all() #8 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(497): WHMCS\Cron\Task\UpdateDomainExpiryStatus->__construct(Array) #9 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): Illuminate\Database\Eloquent\Model->newInstance(Array, true) #10 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/Collection.php(0): WHMCS\Scheduling\Task\Collection->filterToTasks(Array) #11 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Scheduling/Task/AbstractTask.php(0): WHMCS\Scheduling\Task\Collection->__construct(Array) #12 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Builder.php(325): WHMCS\Scheduling\Task\AbstractTask->newCollection(Array) #13 /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Eloquent/Model.php(642): Illuminate\Database\Eloquent\Builder->get(Array) #14 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): Illuminate\Database\Eloquent\Model::all() #15 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Helper/TaskCollectionHelper.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->allTasks() #16 /home/<REDACTED>/public_html/portal/vendor/whmcs/whmcs-foundation/lib/Cron/Console/Application.php(0): WHMCS\Cron\Console\Helper\TaskCollectionHelper->addTasksAsOptions(Object(WHMCS\Cron\Console\Command\DoCommand)) #17 /home/<REDACTED>/public_html/portal/vendor/symfony/console/Application.php(90): WHMCS\Cron\Console\Application->getDefaultCommands() #18 /home/<REDACTED>/portaldata/crons/cron.php(0): Symfony\Component\Console\Application->__construct('WHMCS Automatio...', '7.8.3-release.1') #19 {main} {"exception":"[object] (Illuminate\\Database\\QueryException(code: HY000): SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `tbldomainpricing` order by `tbldomainpricing`.`order` asc, `tbldomainpricing`.`id` asc) at /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:713, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared at /home/<REDACTED>/public_html/portal/vendor/illuminate/database/Connection.php:335)"} []

Link to comment
Share on other sites

Checking email and errors...

The last fail email and error_log entry was at 4:30 PM yesterday. At 5:30 PM ish I added the localhost IP and all the other ifconfig is to the /admin/ directory .htacces allow from statement. 

No errors since. I am hoping this is fixed ... time will tell.

-N

Link to comment
Share on other sites

A moderate amount of research indicates that increasing MariaDB query_cache_size should solve or severely lessen the frequency of the failures. All things being equal, and the system being "Live" we are getting ave of 2 emails a day indicating the the failure shown in the original post.

Does anyone here recommend setting the query cache size? (Currently at 0) if so, to what value?

A side question is: Are these failures causing any damage, or, just failing and not doing anything? And is the 'work' that they should have done being caught up later? i.e. can we simply ignore these errors?

-N

Link to comment
Share on other sites

OK, thanks Chris.  I have set the caching to:

MariaDB [(none)]> SHOW VARIABLES LIKE '%query_cache%';


+------------------------------+----------+
| Variable_name                | Value    |
+------------------------------+----------+
| have_query_cache             | YES      |
| query_cache_limit            | 1048576  |
| query_cache_min_res_unit     | 4096     |
| query_cache_size             | 16777216 |
| query_cache_strip_comments   | OFF      |
| query_cache_type             | ON       |
| query_cache_wlock_invalidate | OFF      |
+------------------------------+----------+

We'll see if this helps at all.

-N

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated