Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. Wordpress (unmanaged) CRON interrupts product loading

Wordpress (unmanaged) CRON interrupts product loading

Scheduled Pinned Locked Moved Unsolved WordPress (Developer)
cron
18 Posts 5 Posters 2.9k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG girish

    I suspect maybe part of the issue is that the WP developer edition runs cron quite aggressively. Once every minute. I am trying to remember why we have a discrepancy between the cron interval of WP developer (1min) and WP managed (5 mins).

    Does anyone know what is the "ideal" value here?

    d19dotcaD Offline
    d19dotcaD Offline
    d19dotca
    wrote on last edited by d19dotca
    #4

    @girish For what it's worth, the Cloudron docs themselves link to this page: https://www.lucasrolff.com/wordpress/why-wp-cron-sucks/

    And on that page it mentions about disabling the WP-cron as you did and then create a real Cron Job to run that script every 5 minutes or so, it also lists other times like 10 minuets or so. I suspect that is where you got the every "5 minutes" from.

    Not sure why it's every minute, but generally speaking I wouldn't think that'd be a big deal anyways, as long as hosting and resources are sufficient I wouldn't expect it to have a negative impact unless the stuff in WP-cron was modified later via plugins to be much more intensive.

    Probably would be fine to change it to run every 5 minutes. My two cents anyways. Would be nice if this was configurable though, I guess it's not because it's set in the package build process, right?

    Update: Apparently Kinsta has an article stating they run it every 15 minutes by default: https://kinsta.com/knowledgebase/disable-wp-cron/#schedule-system-cron

    --
    Dustin Dauncey
    www.d19.ca

    1 Reply Last reply
    0
    • girishG girish

      I suspect maybe part of the issue is that the WP developer edition runs cron quite aggressively. Once every minute. I am trying to remember why we have a discrepancy between the cron interval of WP developer (1min) and WP managed (5 mins).

      Does anyone know what is the "ideal" value here?

      imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by
      #5

      @girish said in Wordpress (unmanaged) CRON interrupts product loading:

      I suspect maybe part of the issue is that the WP developer edition runs cron quite aggressively. Once every minute. I am trying to remember why we have a discrepancy between the cron interval of WP developer (1min) and WP managed (5 mins).

      Does anyone know what is the "ideal" value here?

      Yes, it was me a year ago who requested it because WP has 1 minute cron jobs and they fail if you set it to 5 minutes.

      girishG d19dotcaD 2 Replies Last reply
      0
      • imc67I imc67

        @girish said in Wordpress (unmanaged) CRON interrupts product loading:

        I suspect maybe part of the issue is that the WP developer edition runs cron quite aggressively. Once every minute. I am trying to remember why we have a discrepancy between the cron interval of WP developer (1min) and WP managed (5 mins).

        Does anyone know what is the "ideal" value here?

        Yes, it was me a year ago who requested it because WP has 1 minute cron jobs and they fail if you set it to 5 minutes.

        girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #6

        @imc67 You mean WP has some built-in cron jobs that require 1min interval? I couldn't find information about this, do you have any? I either need to fixed Managed WP or Developer WP accordingly.

        imc67I 1 Reply Last reply
        0
        • imc67I imc67

          @girish said in Wordpress (unmanaged) CRON interrupts product loading:

          I suspect maybe part of the issue is that the WP developer edition runs cron quite aggressively. Once every minute. I am trying to remember why we have a discrepancy between the cron interval of WP developer (1min) and WP managed (5 mins).

          Does anyone know what is the "ideal" value here?

          Yes, it was me a year ago who requested it because WP has 1 minute cron jobs and they fail if you set it to 5 minutes.

          d19dotcaD Offline
          d19dotcaD Offline
          d19dotca
          wrote on last edited by
          #7

          @imc67 Curious why Kinsta which is huge can get away with it at 15 minutes by default though... very strange. You'd think they'd have a whole bunch of customers having issues if that was their default and didn't work with WordPress well.

          --
          Dustin Dauncey
          www.d19.ca

          imc67I 1 Reply Last reply
          0
          • girishG girish

            @imc67 You mean WP has some built-in cron jobs that require 1min interval? I couldn't find information about this, do you have any? I either need to fixed Managed WP or Developer WP accordingly.

            imc67I Offline
            imc67I Offline
            imc67
            translator
            wrote on last edited by
            #8

            @girish said in Wordpress (unmanaged) CRON interrupts product loading:

            @imc67 You mean WP has some built-in cron jobs that require 1min interval? I couldn't find information about this, do you have any? I either need to fixed Managed WP or Developer WP accordingly.

            If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

            girishG LonkleL 2 Replies Last reply
            0
            • imc67I imc67

              @girish said in Wordpress (unmanaged) CRON interrupts product loading:

              @imc67 You mean WP has some built-in cron jobs that require 1min interval? I couldn't find information about this, do you have any? I either need to fixed Managed WP or Developer WP accordingly.

              If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #9

              @imc67 said in Wordpress (unmanaged) CRON interrupts product loading:

              If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

              Ah ok, I think that can be worked around. I have noticed that if you install WP (both versions) and immediately click on the "Enable autoupdates" for a plugin, it will complain about cron not running. But it goes away after the first cron run. So, the workaround is maybe to run cron on package start up (have to try).

              imc67I 1 Reply Last reply
              1
              • girishG girish

                @imc67 said in Wordpress (unmanaged) CRON interrupts product loading:

                If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

                Ah ok, I think that can be worked around. I have noticed that if you install WP (both versions) and immediately click on the "Enable autoupdates" for a plugin, it will complain about cron not running. But it goes away after the first cron run. So, the workaround is maybe to run cron on package start up (have to try).

                imc67I Offline
                imc67I Offline
                imc67
                translator
                wrote on last edited by
                #10

                @girish said in Wordpress (unmanaged) CRON interrupts product loading:

                @imc67 said in Wordpress (unmanaged) CRON interrupts product loading:

                If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

                Ah ok, I think that can be worked around. I have noticed that if you install WP (both versions) and immediately click on the "Enable autoupdates" for a plugin, it will complain about cron not running. But it goes away after the first cron run. So, the workaround is maybe to run cron on package start up (have to try).

                I don’t use autoupdates on my WP sites.

                This cron task is running every minute:

                ActionScheduler_QueueRunner->run()

                1 Reply Last reply
                0
                • d19dotcaD d19dotca

                  @imc67 Curious why Kinsta which is huge can get away with it at 15 minutes by default though... very strange. You'd think they'd have a whole bunch of customers having issues if that was their default and didn't work with WordPress well.

                  imc67I Offline
                  imc67I Offline
                  imc67
                  translator
                  wrote on last edited by
                  #11

                  @d19dotca said in Wordpress (unmanaged) CRON interrupts product loading:

                  @imc67 Curious why Kinsta which is huge can get away with it at 15 minutes by default though... very strange. You'd think they'd have a whole bunch of customers having issues if that was their default and didn't work with WordPress well.

                  Did I remember correctly that you also use MainWP? I’m also a happy user and look there at the cron tasks there are at least 3 that run every minute.

                  d19dotcaD 1 Reply Last reply
                  0
                  • imc67I imc67

                    @d19dotca said in Wordpress (unmanaged) CRON interrupts product loading:

                    @imc67 Curious why Kinsta which is huge can get away with it at 15 minutes by default though... very strange. You'd think they'd have a whole bunch of customers having issues if that was their default and didn't work with WordPress well.

                    Did I remember correctly that you also use MainWP? I’m also a happy user and look there at the cron tasks there are at least 3 that run every minute.

                    d19dotcaD Offline
                    d19dotcaD Offline
                    d19dotca
                    wrote on last edited by d19dotca
                    #12

                    @imc67 Yeah I use MainWP, haven't noticed any issues though and that's running in the Managed version where the cron is every 5 minutes I believe. Where might I check that part in MainWP?


                    Update: Just checked, I see only one that runs every minute, the others are much longer runs.

                    8abbae7d-c143-4ab3-8aed-68348d7d708b-image.png

                    Of course now that I look at it, the Last Run time for the one that runs every minute was yesterday, so that's a bit strange. haha. But I've never noticed any functionality issues or anything like that so far.

                    --
                    Dustin Dauncey
                    www.d19.ca

                    1 Reply Last reply
                    0
                    • girishG girish

                      @DeiWee Have you set up the WP cron job when you set it up in the LAMP app?

                      D Offline
                      D Offline
                      DeiWee
                      wrote on last edited by
                      #13

                      @girish No, I did not. I created LAMP app, migrated site and tested if products keep disappearing. When products was working I notice CRON difference in logs.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        DeiWee
                        wrote on last edited by
                        #14

                        Maybe it is possible to increase CRON time from 1 minute? I tried to change it with WP CRON plugin, but with no success.

                        list.PNG

                        I will try to investigate more with LAMP and custom CRON timing, maybe this is a mix of things with WPML as well.

                        girishG 1 Reply Last reply
                        0
                        • D DeiWee

                          Maybe it is possible to increase CRON time from 1 minute? I tried to change it with WP CRON plugin, but with no success.

                          list.PNG

                          I will try to investigate more with LAMP and custom CRON timing, maybe this is a mix of things with WPML as well.

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #15

                          @DeiWee Thanks, the 1 min cron is hardcoded in the package source code. https://git.cloudron.io/cloudron/wordpress-developer-app/-/blob/master/CloudronManifest.json#L26 . I am looking into what the ideal duration is in the meantime.

                          1 Reply Last reply
                          0
                          • d19dotcaD Offline
                            d19dotcaD Offline
                            d19dotca
                            wrote on last edited by
                            #16

                            Had a quick thought here... if the issue originally reported is truly caused by the cron job... well that cron job is going to run anyways right? So in other words maybe by decreasing the frequency of the cron we decrease the frequency of the issue reported, but the issue reported still in fact remains. Right? Or am I misunderstanding?

                            Almost seems like either A) the cron isn't related to this issue or B) there is something else that needs to get fixed (possibly at the plugin level) that isn't playing nicely with the cron / something environmental.

                            --
                            Dustin Dauncey
                            www.d19.ca

                            girishG 1 Reply Last reply
                            1
                            • d19dotcaD d19dotca

                              Had a quick thought here... if the issue originally reported is truly caused by the cron job... well that cron job is going to run anyways right? So in other words maybe by decreasing the frequency of the cron we decrease the frequency of the issue reported, but the issue reported still in fact remains. Right? Or am I misunderstanding?

                              Almost seems like either A) the cron isn't related to this issue or B) there is something else that needs to get fixed (possibly at the plugin level) that isn't playing nicely with the cron / something environmental.

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #17

                              @d19dotca said in Wordpress (unmanaged) CRON interrupts product loading:

                              Or am I misunderstanding?

                              You are not misunderstanding. We sort of went off on a tangent to understand the cron situation better. The real cause of the original issue, we don't know yet.

                              @DeiWee If this is a setup you are OK with helping us debug, can you please contact us at support@cloudron.io ? You can just make a clone of the app and we can try to figure out what's happening to make the page stall.

                              1 Reply Last reply
                              1
                              • imc67I imc67

                                @girish said in Wordpress (unmanaged) CRON interrupts product loading:

                                @imc67 You mean WP has some built-in cron jobs that require 1min interval? I couldn't find information about this, do you have any? I either need to fixed Managed WP or Developer WP accordingly.

                                If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

                                LonkleL Offline
                                LonkleL Offline
                                Lonkle
                                wrote on last edited by Lonkle
                                #18

                                @imc67 said in Wordpress (unmanaged) CRON interrupts product loading:

                                If you set it to 5 then WP site check is complaining that there are missed events. Because either WP or plugins can create 1 minute tasks.

                                Yes, cron scheduled Wordpress can be scheduled down to the minute. But they're expected to be missed. The default WP-Cron interval is "whenever the next person visits the site, run all the scheduled events that are in the past and haven't been run" (the one that Cloudron rightfully uses the WP-CLI and disables the native WP-Cron). That's pretty horrible, but that's what Wordpress installs expect the environment to be at default. So, the WP Site Check says that's notable, that wp-crons don't get run at the minute they're specified?

                                If the WP Health Status Page actually says that, then Wordpress devs clearly think 1 minute (or a hugely popular site) is the best interval.

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search