• Resolved ivankyli

    (@ivankyli)


    Hello,

    In my site, I have load css async and generate critical css enabled. Generate critical css in background is disabled.

    The critical css generated for front page and any other page (see here) always just contains /* null */ comment. Hence, FOUC is always present.

    I’ve tried to enable background generation, but that gives the same result.

    Report number: CWJBUPID
    Report date: 04/22/2019 21:48:00

    Thanks for any assistance.

    Ivan.

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Hai Zheng⚡

    (@hailite)

    Due to rapid growth of active installations, we got some heavy loads for CCSS online services. We just improved the server capability to better handle the requests. Now it should be fine. Please try more. If you still meet the null CCSS issue, please check your debug log and see what it says when fetching CCSS.

    Thread Starter ivankyli

    (@ivankyli)

    Hello! It’s still unable to generate using ccss.

    
    04/23/19 10:11:17.974 [:55040 1 xjA] [CSS] cron job [type] front [url] https://sample.rideelectricbikes.co.nz [U$
    ] Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/5$
    7.36
    04/23/19 10:11:17.977 [:55040 1 xjA] [CSS] Generating:  --- array (
      'home_url' => 'https://sample.rideelectricbikes.co.nz',
      'url' => 'https://sample.rideelectricbikes.co.nz',
      'ccss_type' => 'front',
      'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.$
    683.103 Safari/537.36',
      'is_mobile' => 0,
    )
    04/23/19 10:11:17.981 [:55040 1 xjA] [IAPI] posting to : https://as.wp.api.litespeedtech.com/ccss
    04/23/19 10:11:18.403 [:55040 1 xjA] [IAPI] failed to decode post json: <!DOCTYPE html>
    <html style="height:100%">
    <head><title> 503 Service Unavailable
    </title></head>
    <body style="color: #444; margin:0;font: normal 14px/20px Arial, Helvetica, sans-serif; height:100%; background-$
    olor: #fff;">
    <div style="height:auto; min-height:100%; ">     <div style="text-align: center; width:800px; margin-left: -400p$
    ; position:absolute; top: 30%; left:50%;">
            <h1 style="margin:0; font-size:150px; line-height:150px; font-weight:bold;">503</h1>
    <h2 style="margin-top:20px;font-size: 30px;">Service Unavailable
    </h2>
    <p>The server is temporarily busy, try again later!</p>
    </div></div></body></html>
    
    04/23/19 10:11:18.411 [:55040 1 xjA] [CSS] empty ccss
    
    Plugin Support Hai Zheng⚡

    (@hailite)

    Can you try it now? Thanks.

    Thread Starter ivankyli

    (@ivankyli)

    Hi,it’s back to the original issue now:

    
    04/23/19 19:22:32.565 [:33052 1 apT] [CSS] saved ccss /usr/share/nginx/html/sample.rideelectricbikes.co.nz/wp-content/cache/ccss/product.css
    04/23/19 19:22:32.565 [:33052 1 apT] [CSS] ccss con: /* null */
    
    Plugin Support Hai Zheng⚡

    (@hailite)

    Just fixed a deployment issue. Do you mind to try it now?

    Thread Starter ivankyli

    (@ivankyli)

    Hello, it’s still the same. I checked the generated file and it only contains /* null */

    
    04/24/19 11:56:51.727 [:43114 1 H8W] [CSS] saved ccss /usr/share/nginx/html/sample.rideelectricbikes.co.nz/wp-content/cache/ccss/front.css
    04/24/19 11:56:51.727 [:43114 1 H8W] [CSS] ccss con: /*
    null */
    

    Are you able to see any clues on your server as to why it might be generating this way?

    Hi @ivankyli, we found your site contain css error:

    CssSyntaxError: /min/c2bf3.css:8:545292: Unknown word

    could you please take a look at the CSS script, you can turn off CSS Minify for easier checking.

    Thread Starter ivankyli

    (@ivankyli)

    Hello, I’ve fixed the CSS issue but still getting empty response from ccss generation:

    
    04/25/19 10:24:51.122 [:56224 1 Avb] [CSS] cron job [type] front [url] https://sample.rideelectricbikes.co.nz [UA
    ] Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/53
    7.36
    04/25/19 10:24:51.126 [:56224 1 Avb] [CSS] Generating:  --- array (
      'home_url' => 'https://sample.rideelectricbikes.co.nz',
      'url' => 'https://sample.rideelectricbikes.co.nz',
      'ccss_type' => 'front',
      'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3
    683.103 Safari/537.36',
      'is_mobile' => 0,
    )
    04/25/19 10:24:51.130 [:56224 1 Avb] [IAPI] posting to : https://as.wp.api.litespeedtech.com/ccss
    04/25/19 10:25:06.139 [:56224 1 Avb] [IAPI] failed to post: cURL error 28: Operation timed out after 15001 millis
    econds with 0 bytes received
    04/25/19 10:25:06.139 [:56224 1 Avb] [CSS] empty ccss
    

    From my server I can wget https://as.wp.api.litespeedtech.com/ccss

    Any other clues as to what’s happening?

    Seems that your site is too large for generating CCSS within 15 sec, could you try to edit wp-content/plugins/litespeed-cache/admin/admin-api.class.php row 383:

    From
    $response = wp_remote_get( $url, array( 'timeout' => 15 ) ) ;

    To
    $response = wp_remote_get( $url, array( 'timeout' => 30 ) ) ;

    for increasing the timeout?

    Thread Starter ivankyli

    (@ivankyli)

    Hello,

    Thanks for the tip. Although I’m really surprised that would be the issue since my front page is only 546KB and fully loads within 2.0s according to gtmetrix..

    What user agent does your server query with? Or any way to identify the request from server logs? Just want to make sure I’m receiving the request on the server.

    Thanks,

    Ivan.

    Thread Starter ivankyli

    (@ivankyli)

    Hi, just updating the issue. Increasing the timeout to 60s solves the issue. Is it possible to increase this timeout permanently in future releases of this plugin?

    Thanks for your help,

    Ivan.

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

The topic ‘Generated Critical CSS contains only “/* null */”’ is closed to new replies.