Page Optimization CCSS Cron Issue

Wordpress LScache Plugin: Page Optimization CCSS Cron Issue

Dear LS Support Team, Report number: YMAGFVFM My problem is that the lscache plugin wont auto pull critical css generation for each url in batches/groups but rather it will do it one by one every 1/2/5 minutes.. Settings: decent webhosting with no limit on the wp-cron scheduler. CSS Combine & Generate UCSS is OFF along with UCSS Inline as per your docs it will automatically bypass Load CSS Async if these are set to ON. As long as I do not need UCSS but CCSS for each page, I have Load CSS Async + CCSS per URL set to ON. Async CCSS says: Automatic generation of critical CSS is in the background via a cron-based queue. as per your docs also Now what does that mean? Can I limit the default WP-CRON inside my cPanel with a custom cron settings, and your cron-based queue will still run? Currently there is no limit on the wp-cron. Also, your automatic pull works at what interval? Every 5 min it pulls 1 page? I also have paid sub for page optimization inside, domain key and everything is correctly setup and runs as expected. Attached images show between 10-15 minutes there were 2 (two) successful generation of CCSS via your cron which is like I have to wait a day to have every pages CCSS generated then itll almost start over again?. The page I need help with: Update: meanwhile searching then writing this post in 30 minutes it generated 5 CCSS out of the 477 total in the queue. Images uploaded to OneDrive:!Aj9Ddckmlw5a6S6bUuWRXwKsiyc5?e=0k0BUK Update #2: URL list in CCSS queue waiting for cron currently 465 out of the initial 477 I also want to point out that the process finishes without any problem if I hit Run CCSS Queue Manually. It will take around 1-15 minutes depending on the number of URLs in queue but it wont throw like out of resource error or anything. In the other hand, I do not intend to run this manually all the time, thats why it should be done via your auto cron. Hi, check the wp cron task list , make sure CCSS task is there and then make sure you have wp cron running , should use cPanel to trigger the cron , instead of wp-cron.php and consider to use wget or curl instead of php binary to run it best regards, Where is a documention for such set up? As per your first responses, I can verify CCSS task is not in cron list which I got from running: SELECT FROM wp_options WHERE option_name LIKE %cron% inside my phpmyadmin database SQL query. Regarding the second statement, you mean I should disable wp-cron inside my wp-config.php, and then go to cPanel and set up a custom cron for the domain? Why would it work? The least time a cron would run in this way is every 1 minute, I cannot lower it anymore. I have no knowledge of wget nor curl to swap from php, any docs is much appreciated. Summary: my site says: URL list in CCSS queue waiting for cron ( 3 ). I do not know which or how many pages CCSS have been generated meanwhile I was away, but for sure there is no CCSS task in wp_options table scheduled. no , search for query like litespeed_task in database for cron , please check this one minute is bit of excessive , 5 minute per once should be good enough if you are using wp-cron , it reuqires PHP to be hit , sometimes when page is fully cached, it wont trigger PHP so it wont execute the cron , therefore it is better to use cpanel cron to trigger it Yes I can verify there is one in wp_options and I can see it contains litespeed_task_ucss, litespeed_task_ccss, litespeed_task_imgoptm_req, even automatewoo etc. I disabled wp-cron in my wp-config.php with define(DISABLE_WP_CRON, true) Then I went into custom cronjobs again and recreated the same cron which I already had but thought thats the problem limiting the things.. Code used: wget -q -O - >/dev/null 2>&1 and is set to run every 5 min (just like it was setup before I posted this article several days ago). Now I see what you meant by wget, it is set up that way. Still, I have multiple questions which is nowhere documented on your site. 1) How may I check which pages critical css had been generated? I can see each pages response header or use the litespeed cache check websites to see if there is a cache hit. But how do I know if that particular page has CCSS generated and in use? 2) After doing purge all the page optimization cron slowly start to dig my site which pages need CCSS regenerated. After how much time it will start looking for such? 3) Following up on 2) at what intervals does your cron look for jobs ? Is it every 5 minutes? If so, why the hell does it generate ONLY ONE CCSS for 1 freaking page and then it will generate another one after 5 mins?? I literally have 500+ pages to have ccss generated for them but it will take a while to generate those many ? 4) Is page optimizations cron being affected by LSCaches crawler? 5) After success generation of CCSS (which I have no point knowing if ALL OF THEM had been generated) after what time do they expiry ? Their expiry is controlled by what inside your plugin? A TTL setting in seconds or something else..? Hi, 1) please check this page 2) what do you mean by for such in this context, what is the such ? 3) for server load consideration , cron based task could usually be fewer quantity , but 500 pages should just take less than 2 days. 4) what is the affect in this context ? I mean , in what way you refer to ? 5) then dont expire on their own , unless you have explicitly purged them , so please keep in mind if you have changed page style , you will need to do so , otherwise your style may not show up or mess up Best regards, Hi there @CacheCrawler , Never mind, I completely disabled this CCSS option as it takes too long for me. There are a few problems with this as of 1) I dunno after what time it will regenerate itself but assume until content is changed/deleted/refreshed, it will stay as is 2) It takes plenty of time even with paid sub to to optimize the pages. Eg. if my site would have 2000+ products with more and more pages, it would take a lot of time. Also, part of the product catalog is dynamically updated each day & week so this option is useless in this case. 3) I tried both UCSS and CCSS combined, it even turned out worse in PSI and GTMetrix scores, so I assume (but will contact theme dev) my theme is coded well enough. Note: when I had CCSS enabled, initial server response time was about 1 sec or even more on mobile. Now it seems more responsive with less waiting on the blank mobile page to do something. So Im OK with the CSS cahcing options disabled, but I appreciate your help and guidelines you mentioned. Generally speaking, I would maybe consider enabling guest optimization.. If I have the above two CSS caching options disabled, what would guest optimization do if I enable it? What is your best suggestion to reduce initial server response time? Ive crawled all optimization tips to reduce css/js code, optimize & size image in the best formats and sizes, decrease DOM element being used, even Elementors output optimizer & improvement features are on with the least plugin in use. Ive read up and can confirm CCSS remains as long as I do not purge the cached content, thanks for the tip+ It will still uses CCSS/UCSS on guest page , regardless if you have disabled them in normal page for response time , one thing is to use crawler to keep warm up the cache Hello, Thanks for the quick reply. Considering Guest optimization ? What does Guest Mode do when only that is turned ON (on its own)? In your docs I see that Guest Optimization ON means maximum optimization will be in use which includes U/CCSS and everything. Another side note from mobile usage and potential replicate of the issue: Turn on CSS caching & optimization, turn on guest mode & optimization. When these are IN USE and files are created for one particular (eg home) page, when I visit my site from a different browser from within a private (no cache, no log, no b. history) tab, my site loads for around 80%, I can see its above the fold content and even scroll, but eventually it will reload/refresh itself and load up fully the second time only. As per your docs, if Guest Mode is ON, it would load other content via AJAX calls, but I cannot verify if thats the case. Instead this weird page refreshing is happening. LS plugin version: v4.5.0.1 And another thing to mention: Under current plugin settings, there is no option to Load CSS Asynch and to PREVENT your cron from AUTO PULLING. Afaik there are images and articles that there were settings for this in previous versions. How may I work around this if I would like to have each page/urls critical CSS generated on first users visits instead of the automated cron worker? Currently the crawler is in use, so I consider there are no other options to improve initial server response time, but thanks for mentioning.