Support » Plugin: LiteSpeed Cache » ESI causes problems with Query Monitor

  • Resolved titsmaker

    (@titsmaker)


    Hi. I was using ESI for long time and it was working fine but recently Query Monitor’s frontend functionality became affected by ESI. When ESI is on I can’t open any of QM menu items – the plugin is working, menu is there, but when I click one of it’s items nothing happens. I am using latest stable version of Litespeed and QM, WP ver. is 5.6.2.
    There are no errors in browser console.
    Also I have had troubles debugging the issue because I expected ?LSCWP_CTRL=NOCACHE to disable cache completely, but actually it does not affect ESI. Later I saw it in the headers and was quite surprised. This is rather strange, why it is designed that way?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please try /?LSCWP_CTRL=before_optm ?

    Best regards,

    Thread Starter titsmaker

    (@titsmaker)

    I already tried it as well. Same result. Header is also x-litespeed-cache-control: no-cache,esi=on.

    Plugin Support usabe

    (@usabe)

    Hello @titsmaker,

    Congratulations, you have helped us identify a bug. Yes, it logically makes sense that when the page is set to no-cache then esi should be disabled for this page.

    Thank you for the report. Will put it to our list for fix.

    Thread Starter titsmaker

    (@titsmaker)

    I am glad to hear that you gonna fix NOCACHE behaviour.
    But I am still struggling with my original problem with Query Monitor.

    Plugin Support usabe

    (@usabe)

    About the QM not working with esi on issue, I suggest you ask the QM dev team. This is a known issue for QM. Frankly speaking I myself had this issue as well when I was using QM. You could also find other people’s reports regarding this issue with QM.

    John Blackbourn

    (@johnbillion)

    WordPress Core Developer

    Does this plugin call fastcgi_finish_request? If so, that’ll be what’s breaking QM and it’ll break any other plugin that triggers output inside a shutdown handler too.

    Plugin Support usabe

    (@usabe)

    Thanks @johnbillion for the hint.

    As far as I know, from the LSCWP plugin side, it does not call fastcgi_finish_request.

    But are you sure this is caused by LSCWP? Any other hint? If you have maybe I can have further check. Thought it’s from QM side so didn’t check further in the past.

    Plugin Support Hai Zheng⚡

    (@hailite)

    Thanks for your reply. As ESI will make adminbar a separate request to server side, I think the cause of breaking is QM can’t address and parse the whole page as before. The queries it can count will be only the ones in that ESI request, while not the parent page.

    Here is the fix https://github.com/litespeedtech/lscache_wp/commit/49c49449376f5d9e0eda5a63e7a90cccb15cab9a

    Hope that can help.

    Plugin Support usabe

    (@usabe)

    Greetings @johnbillion & @titsmaker :

    Thank you for bringing this up, especially thanks for John’s attention. Because of your effort, now the issue got resolved and I could enjoy QM for those pages again!

    You can try it with LSCWP dev branch v3.7 rc24 (the latest one as of today) if you want. Append the query string LSCWP_CTRL=NOCACHE will bring QM to function again.

    Please just bear in mind that, due to code base changes, to update to latest dev branch smoothly we have to upgrade to latest master branch(v3.6.4) first if you are using the master branch. The latest master branch is already in WP marketplace as of today.

    Cheers and best regards,
    Abe

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.