• Resolved nerdnestmedia

    (@nerdnestmedia)


    Hello!
    We have been having issues with our site going down often lately. Our host has let us know the following and asked that we relay this information to you:

    The problem comes down to all PHP processes running indefinitely and using up all CPU and then since they are stuck processing the requests, no new requests can be processed.
    
    If you want to report the issue to the plugin developer, you can provide him with this stack trace:
    
    [0x00007efd630148c0] getRulePeriods() /home/nginx/domains/sewcanshe.com/public/wp-content/plugins/timed-content/timed-content.php:1026
    [0x00007efd630147f0] getRulePeriodsById() /home/nginx/domains/sewcanshe.com/public/wp-content/plugins/timed-content/timed-content.php:1628
    [0x00007efd63014690] rulesShowHTML() /home/nginx/domains/sewcanshe.com/public/wp-includes/shortcodes.php:356
    [0x00007efd630145a0] do_shortcode_tag() /home/nginx/domains/sewcanshe.com/public/wp-includes/shortcodes.php:228
    [0x00007efd63014520] preg_replace_callback() /home/nginx/domains/sewcanshe.com/public/wp-includes/shortcodes.php:228
    [0x00007efd63014430] do_shortcode() /home/nginx/domains/sewcanshe.com/public/wp-includes/class-wp-hook.php:307
    [0x00007efd63014350] apply_filters() /home/nginx/domains/sewcanshe.com/public/wp-includes/plugin.php:191
    [0x00007efd63014280] apply_filters() /home/nginx/domains/sewcanshe.com/public/wp-includes/post-template.php:253
    [0x00007efd630141f0] the_content() /home/nginx/domains/sewcanshe.com/public/wp-content/themes/kadence/template-parts/content/entry_content.php:27
    [0x00007efd63014180] [INCLUDE_OR_EVAL]() /home/nginx/domains/sewcanshe.com/public/wp-includes/template.php:772
    [0x00007efd63014020] load_template() /home/nginx/domains/sewcanshe.com/public/wp-includes/template.php:716
    [0x00007efd63013f30] locate_template() /home/nginx/domains/sewcanshe.com/public/wp-includes/general-template.php:204
    [0x00007efd63013e70] get_template_part() /home/nginx/domains/sewcanshe.com/public/wp-content/themes/kadence/template-parts/content/single-entry.php:28
    [0x00007efd63013de0] [INCLUDE_OR_EVAL]() /home/nginx/domains/sewcanshe.com/public/wp-includes/template.php:772
    [0x00007efd63013c80] load_template() /home/nginx/domains/sewcanshe.com/public/wp-includes/template.php:716
    [0x00007efd63013b90] locate_template() /home/nginx/domains/sewcanshe.com/public/wp-includes/general-template.php:204
    [0x00007efd63013ad0] get_template_part() /home/nginx/domains/sewcanshe.com/public/wp-content/themes/kadence/inc/template-functions/single-functions.php:27
    [0x00007efd63013a60] Kadence\single_content() /home/nginx/domains/sewcanshe.com/public/wp-includes/class-wp-hook.php:307
    [0x00007efd63013980] apply_filters() /home/nginx/domains/sewcanshe.com/public/wp-includes/class-wp-hook.php:331
    [0x00007efd63013910] do_action() /home/nginx/domains/sewcanshe.com/public/wp-includes/plugin.php:476
    
    and just say the scripts involved in the timed-content plugin are causing the processes to run endlessly.

    Please let me know how to proceed.
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    I am sorry to hear that you have issues with the plugin.

    However the code in question will not run “endless” – it may just take some time to calculate the times which apply for a rule. That code was already changed in the last update to limit the number of periods to a maximum of 20 periods into the future.

    However if the rule starts a couple of years ago the number of required calculations may still be quite high.

    For example: if you have a rule which starts at 2010 and will repeat every day you may end up in more than 4000 periods which have to be considered before the plugin knows if the rule applies to the current date or not.

    I’ll see what I can do in future updates to decrease the required calculations even further – but for now I can only recommend to update the existing rules to start at the latest possible date (e.g. not earlier than August 1, 2022) to avoid too many calculations.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    In this instance, we have only been using the plugin since October of last year. So there would be no more than 10 months of data in the rules.

    Every day there is one blog post that has timed content active that gives people a PDF for free. This script is on over 200 posts, but only have it active in one post at a time from midnight EST until Midnight PST (so there are 3 hours of overlap)

    Would you be willing to take a look and make sure it’s set up correctly from your perspective? Or let me know how to troubleshoot further.

    Thanks!

    Plugin Author Arno Welzel

    (@awelzel)

    Even if Timed Content needs only 0.1 seconds to do the calculation and filtering for a post this may acumulate to a quite high server load if you have thousands of visitors in a short time period. And as more people visit the site, the more the server has to do which could make things even worse as at some point new visitors have to wait until the previous requests have been served.

    So the questions are:

    How exactly is the rule defined?

    How many requests do the affected posts have every day?

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    Rule Description:
    Show the content on 2022-08-05 @ 00:00 until 2022-08-06 @ 03:00.
    Repeat this action every day.
    This rule will be active for one recurrence.
    All times are in the America/New_York timezone.

    It’s just one post a day, and probably sees quite a few hits. I have requested that info from my client.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    Client said about 300 hits roughly on the one set up for today. These rules are all still in there, but only set to run once a day, then stop.

    Plugin Author Arno Welzel

    (@awelzel)

    A rule which is defined as “2022-08-05 @ 00:00 until 2022-08-06 @ 03:00.” will be active for 27 hours:

    2022-08-05 00:00 until 2022-08-05 23:59
    2022-08-06 00:00 until 2022-08-06 03:00

    Repeating this every day makes no sense as the rule will then be active all the time:

    Day 1:

    2022-08-05 00:00 until 2022-08-05 23:59
    2022-08-06 00:00 until 2022-08-06 03:00

    Day 2:

    2022-08-06 00:00 until 2022-08-06 23:59
    2022-08-07 00:00 until 2022-08-07 03:00

    And so on…

    At least the rule itself should not cover a time period of more than 24 hours if it should be repeated daily.

    Furthermore you refer to “my client”. I assume that you get paid for your work. In this case please understand that I can not provide free support since the plugin is already for free. If you are interested in assistance I suggest you contact me via e-mail (see https://arnowelzel.de/en/about-me) so we can talk about the conditions for professinal support which also includes having a look at the server to see if there is anything wrong.

    Thread Starter nerdnestmedia

    (@nerdnestmedia)

    I have worked with her host, and it’s definitely not that. Everything is pointing back to this plugin not being optimized. We have removed your plugin and are using a different onenow.

    As for “getting paid”, you should make your plugin a paid plugin if you are that concerned.

    Plugin Author Arno Welzel

    (@awelzel)

    Whatever “not optimized” should mean. You can have a look at the code and tell me what exactly needs to be optimzed. I also happily accept pull requests for code changes and of course mention anyone in the documentation about his or her contribution:

    https://github.com/arnowelzel/timed-content

    Besides that the plugin has a 4.5 star rating and works fine on thousands of other sites. I also use it myself on a site which has more than 10.000 visits every day without any issue – no “endless run”. Also see the support forum – so far nobody ever had this problem.

    So I have to chance at all to provide any fix as I still don’t know what is going on exactly your clients site. Any further investigation would require that we get in contact personally to discuss how to analyze the problem on your clients website in detail – and this can take some time which I can not provide for free.

    But if not using the plugin at all is also a solution – fine. Then I consider this problem as resolved.

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

The topic ‘Site Down Often – Issue with Plugin?’ is closed to new replies.