Heartbeat not work correctly
-
Heartbeat not work correctly.
Litespeed setting not ovverride WordPress settings.
Into dasboard and editor heartbeat run every 10 seconds, no matter you set into Litespeed.
Please, look how to Breeze cache plugin make heartbeat, because into these plugin this work fine.
-
Hi, I looked into this, and the 10 seconds comes from WordPress itself, not from LiteSpeed ignoring your setting.
LiteSpeed sets the Heartbeat interval through the
heartbeat_settingsfilter, which is only the starting value. After the page loads, WordPress core switches Heartbeat to 10 seconds by itself on these screens, to keep post locks up to date:- the block editor
- the classic editor, when post locks are on
- the Posts and Pages list screens
That is the 10 seconds you see there. On the other admin screens the LiteSpeed value should stay.
Breeze does it differently: in the block editor it adds an extra script that sets its own interval again after WordPress switches it to 10 seconds. LiteSpeed does not do that, so this is a good feature request for the LiteSpeed team.
A TTL of 0 in LiteSpeed Cache > Toolbox > Heartbeat removes Heartbeat completely on that area, but it also removes autosave and the login expired check, so I would not do that for the editor.
On which screens do you see the 10 seconds?
I see 10 second on pages/post list and page/post edit screen.
/wp-admin/edit.php
/wp-admin/edit.php?post_type=page
/wp-admin/edit.php?post_type=every other custom post type
/wp-admin/post.php?post=99999999999&action=edit@mkdes hello
@softglaze is right about he’s findings. Heartbeat limitations are working as expected(from LSCWP). WordPress is adding requests to ensure the info from admin are up to date
@softglaze thank you for suggestion. I will forward it to developers.In my opinion, Breeze handles this well. This is especially perceptible on a multisite instance with several sites, where 2–3 administrators are working on each one throughout the day. They keep web pages open just so the boss can see that they’re working. They do not realize that they are generating so many requests to the server, which ultimately has a negative impact on performance.
I am pointing you toward a direction that I have tested myself as an administrator. Naturally, you may do as you see fit.
Thank you all for your time.
@mkdes We are looking into 🙂
Thank you!Thank you both for the details, they helped me find the cause. I prepared a change that keeps the LiteSpeed Cache Heartbeat interval on the post/page lists and in the editor, after WordPress switches it to 10 seconds.
To test it:
- Go to LiteSpeed Cache → Toolbox → Beta Test.
- Paste this link into the field and click Upgrade:
https://github.com/timotei-litespeed/lscache_wp/commit/96954da5a459aa1e7641e1b3ea6c903e7fd067ed - Set the Heartbeat intervals in Toolbox → Heartbeat, then open the post/page lists and the editor and check whether the interval stays as configured.
It is based on the current development version. To go back, use Use latest WordPress release version on the same Beta Test page.
Testing and sharing your results helps the fix get reviewed faster. It is still a test version, though, so it doesn’t mean this change will be included in a release.
Thanks again for your help!
I tested Backend Heartbeat and Editor Heartbeat – works fine. Thank You.
I can not test Frontend Heartbeat Control.
You must be logged in to reply to this topic.