• Resolved vminenko

    (@vminenko)


    I have WP-Optimize Premium 3.2.9 and keep trying to get Preload to cover all pages finally. It gets 10-20 pages and then stops. Current message:

    Preloading posts found in sitemap: 14 out of 224 URLs preloaded

    What is going on here, and how to find out what is wrong?

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Venkat Raj

    (@webulous)

    @vminenko Preload is a long running process. This can happen for two reasons.

    1. Your server doesn’t support the attempt to close browser connection.
    2. Your server kills long running php processes automatically after certain time period.

    Could you please run this WP CLI command and see if that works?
    wp optimize cache preload

    Thread Starter vminenko

    (@vminenko)

    works ok on console:

    > time wp optimize cache preload
    Preloading URLs into cache…
    Success: All URLs were preloaded into cache successfully

    real 0m49.912s
    user 0m2.349s
    sys 0m34.192s

    A few mins after, on the admin page the Preload still reports:

    Preloading posts found in sitemap: 18 out of 227 URLs preloaded

    Plugin Contributor Venkat Raj

    (@webulous)

    @vminenko Did you cancel the preload (which was stuck) before running the cli command? If so, it shouldn’t happen

    Thread Starter vminenko

    (@vminenko)

    @webulous : you rock! this changed everything! Preload works now as expected! Well, at least as much as I manually clicked! Apparently muy hoster does not like long-running background tasks. Maybe a feature to add: watch where you stopped, decremented by one, and schedule for the next hour ?? Are there some other nice command line tools? ?? Thanks a lot for the help! I’m now a happy customer! ??

    Hi @vminenko or @webulous,
    The preload process running from WP CLI is much shorter than that from pressing the Run Now preload button. The later takes me over an hour to complete and from time to time have to deal with the “Unexpected response . . .” message.
    I would like to give the command a try. But I am not familiar with the steps to execute it. Can you provide instructions on how to do this? Where do I activate the WP CLI module? What precaution I need to be aware of? Will the command also triggers the minification process? (I do have it enabled)
    Thanks in advance.

    Plugin Contributor Venkat Raj

    (@webulous)

    @vminenko When you click preload it first gathers all URLs and setup a queue. If not all URLs are loaded within a specific time frame, they are loaded using a WP cron job which runs every 10 minutes until all URLs in the queue are loaded.

    So what you suggested is something we are already doing.For some reasons we have issues with some servers which we are investigating.

    You can see list of available CLI commands by running wp optimize command
    Or consult this article https://getwpo.com/new-command-line-feature-for-wp-optimize/

    Happy to help! ??

    Plugin Contributor Venkat Raj

    (@webulous)

    @francoc30

    You need SSH access for that. If you happen to use cPanel hosting, You can see it under security section
    https://blog.cpanel.com/wp-content/uploads/2021/07/Jupiter-tools-page.png

    WP_CLI should be installed on your site. Here is a guide to do that
    https://make.www.ads-software.com/cli/handbook/guides/installing/

    Then you can run wp optimize cache preload command.

    To see list of available commands with WP Optimize use wp optimize

    OR simply you can ask your hosting provider to setup a cron job using crontab that runs the wp optimize cache preload at whatever interval you like (once a day, weekly, etc)

    @webulous,
    Thanks for the info. My host do have a cPanel, but there is no Security section. When I search for SSH in their Help, it finds nothing. So this option is no use for me.

    Their cPanel has a Schedule Job section. But it run jobs (scripts) with a url. I’ll have to input the url where the script is located. Is this possible with wp optimize cache preload command?

    Thread Starter vminenko

    (@vminenko)

    @webulous I do not have a view on the insights, but I have a impression that taking fixed sets of 10 it not the best choice. My site is on a shared hosting and apparently get certain slots for execution. The number of preloaded pages was never round by 10. This means that either each 10 pages take different times to cache or the time slots are different or both. This why I suggested a sort of adaptive batches. I found more commands via the CLI. One thing came to my attention:

    > wp optimize cache purge
    Success: You do not have permission to purge the cache
    > wp optimize cache status
    Success: Caching is enabled
    Current cache size: 174.11 MB
    Number of files: 1264
    Last preload finished at 08:31, 2022-11-10

    I’not fully sure which kind of success is reported on purge esp considering that purge was not done… What is the trick to make purge happen?

    Plugin Contributor Venkat Raj

    (@webulous)

    @vminenko We will look into this

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Preload gets 10-20 pages and stops’ is closed to new replies.