• Resolved Leo Santis

    (@leosantis)


    In fact I have both APCu and OPcache Manager installing and running well for quite a long time without any issues and that’s including Analytics Panels for both.

    Indeed, Analytics even helped me to fine-tuned server configuration.

    I decided to disable the default WordPress cron and create a task on the server for notorious reasons.

    This task is scheduled to run every 5 minutes and it’s running ok. All WP tasks are not behind and health status is also Ok. I’m telling that because if server cron task was not OK, those would warning me about (I tested).

    With server cron task both APCu and Opcache analytics are dead. If switch back regular wp-cron, analytics comes bck to normal.

    That’s quite strange as I could read around other topics here, it was supposed to work like that.

    The only thing that could affect (despite it’s working on regular wp-cron) is I’m running on Nginx.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello @leosantis !

    How is your server cron task done? Is it via http (with curl or wget) or is it done via php cli?

    Thread Starter Leo Santis

    (@leosantis)

    Hi @pierrelannoy ,

    Glad to hear from you and your quick answer.

    Cron setup is typical direct PHP such as :

    */5 * * * * /usr/local/bin/ea-php83 /home/user/domain.com/wp-cron.php >/dev/null 2>&1

    Checking cron.log it runs OK and like I said, all regular WP schedule tasks are OK but PerfOps Analytics.

    Wget commands are disabled in y server for security reasons.

    • This reply was modified 3 months, 2 weeks ago by Leo Santis.
    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    OK. It’s what I thought…
    The error is mainly due to differences in php configuration (php.ini and others) beetwen web and cli.

    If you can’t test it with wget or curl (I don’t understand why it is a security reason, despite my best efforts), you have to set your cli php configuration the same way you’ve done it with your web php handler. I suggest trying to start by verifying APCu is loaded and activated and OPCache is activated (with no restrictions about OPcache functions).

    Thread Starter Leo Santis

    (@leosantis)

    Just edited server cron to Curl and it’s all great again. Probably that’s something (somewhere) related to php version, different between web and cli like you mentioned.

    Wget is blocked here to avoid users to run anything from outside server, that caused us some damage in the past where people just see some “google” recipes.

    Thank you and all the best

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Great news!

    Thread Starter Leo Santis

    (@leosantis)

    Hi @pierrelannoy,

    Not sure if would be better to open a new topic but this one is same subject, different scenario but topic was open by myself so I’m not breaking any rule. (lol…)

    Analytics Page no longer Works After 3.4.0

    It’s been working great both Opcache and APCu analytics for quite long time (as you can see by previous messages) but stopped right after upgrading to 3.4.0 (and 4.4.0 for APCu)

    I’ve been using server cronjob setup to every 5 min and it was working just fine. For some reason after last update, both analytics pages no longer works.

    Setup for both remains the same as well as server cronjobs. And checking cron logs, they are ok and even using WP Site Health, if there’s any schedule task behind or cron issues, site health would show any.

    Any clue about that?

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Hello @leosantis!

    Sorry to hear about that.

    Do you have something in your php error log?

    Thread Starter Leo Santis

    (@leosantis)

    Hi Pierre, no errors at all at PHP. I can reach the Analytics pages correctly but those are loaded without any data. No graphics or indicators, Cached Files shows 0 and Availability 100%.

    At the Analytics page if I select a custom date prior to the date I upgraded plugins, I can see those perfectly.

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    I’ve no idea why…

    Could you share a screenshot of the whole analytics page (for both OPCache Manager and APCu Manager as the 2 plugins are impacted)?

    Thanks

    Thread Starter Leo Santis

    (@leosantis)

    Sure, my pleasure.

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    OK, thanks.

    I can see some reason to this behaviour.

    First of all, if you agree, can you make a litlle verification? Here it is :

    • verify you have : define('DISABLE_WP_CRON', true); somewhere in your wp-config.php
    • confirm you’re doing your cron via curl or wget.
    Thread Starter Leo Santis

    (@leosantis)

    Yes, wp-config is properly set with define(‘DISABLE_WP_CRON’, true);

    Cron jobs is set as direct PHP as /usr/local/bin/php /home/user/domain.com/wp-cron.php >/dev/null 2>&1

    Thread Starter Leo Santis

    (@leosantis)

    I’ve decided to make a small experiment, as it used to work previously. Coincidently, same day I updated your plugins I made a change on cron job. It used to be Curl and I changed to PHP as it’s more efficient as bypass server limits and it doesn’t take network slots.

    I’ve just changed back to Curl and both came back again to work correctly.

    Question is why don’t work with PHP even WP doesn’t indicating any due schedule tasks?

    Plugin Author Pierre Lannoy

    (@pierrelannoy)

    Because, cron are working! But the PHP config difference between web and cli do not allow to collect specific web data, unless it is executed in web context.
    Think about it : opcache an apcu are php pool dependant. In cli, there’s even no apcu…

    BTW: glad you found it…

    Thread Starter Leo Santis

    (@leosantis)

    Thanks again and all the best

Viewing 15 replies - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.