LiteSpeed Cache Randomly Breaking PrestaShop Pages

#1
Environment Details

The server is running on Linux (64-bit) with kernel version 5.14.0-503.34.1.el9_5.x86_64. The hosting environment is shared hosting. The web server is LiteSpeed Enterprise, managed by the hosting provider. The LiteSpeed Cache module version is 1.5.3.

PHP and Application Information

The website is running PHP 7.3.33 using the LSAPI interface. The application affected is PrestaShop version 1.7.6.9. In order to rule out application-level caching conflicts, Smarty cache is disabled, CCC (combine, compress, cache) is disabled, and Apache optimization is disabled in PrestaShop.

Issue Description

LiteSpeed Cache is causing random and intermittent frontend page breakage. On inspecting it shows no compile css or js in html or any network requests. Pages sometimes load correctly, but at other times they render broken or incomplete without any consistent pattern. The issue affects public cached pages and does not appear to be tied to a specific browser, user session, or page type. Disabling the LiteSpeed crawler did not resolve the problem, which suggests the issue is not crawler-related but cache-related.

Reproducibility

The issue is not reliably reproducible. Typically, a page loads correctly on first visit, but after refreshing or revisiting later, the same page may load broken. The behavior appears random and inconsistent.

Behavior Before and After LiteSpeed Cache

Before enabling LiteSpeed Cache, pages rendered consistently with no frontend issues. After enabling LiteSpeed Cache, pages began to break randomly, indicating a strong correlation between the issue and LiteSpeed Cache behavior.

LiteSpeed Cache Configuration

LiteSpeed Cache is enabled. The default public cache TTL is set to 86400 seconds, private cache TTL to 1800 seconds, home page TTL to 86400 seconds, 404 page TTL to 86400 seconds, and product comments TTL to 7200 seconds. Separate mobile view and separate cache per customer group are both disabled. Guest mode is also disabled.

Product and category pages are flushed when quantity or stock status changes, while the home page is not flushed on order placement.

Cache Rules and Exclusions

The following URLs are excluded from caching:

/admincp
/faqs
/module/productcomments/*
/order


The GET parameter from-xhr is configured as a do-not-cache parameter.

Debug and Logging

Debug headers and debug logging are enabled, with the debug level set to 9. Logs are being generated for all traffic and are available in lscache.log. No consistent fatal PHP errors or LiteSpeed crashes have been observed in the error logs.

Core Dumps

Core dumps could not be checked because the site is hosted on shared hosting with no SSH access, and the /tmp/lshttpd directory is not accessible.

Additional Notes

The issue persists even after disabling the LiteSpeed crawler. Multiple PrestaShop caching and optimization features have been turned off to avoid conflicts. The behavior strongly suggests a cache corruption or invalidation issue affecting PrestaShop 1.7.6.9 when served through LiteSpeed Cache.
 

Attachments

#3
Disable Hostinger CDN cache and try again.
Hi,
Thanks for quick response. Disable cdn cache on hostinger is ok. But it is happening randomly and sometimes it just print the html instead of rendering. So it is just impossible to find actual cause. I am curious to know if it is php version 7.3.33 causing the issue or something else. Struggling with litespeed issue for last six months. It is breaking modules like product comments. faqs etc and need patching each time.
isn't there any logging system which records debug information?
 
Top