https://bz.apache.org/bugzilla/show_bug.cgi?id=69567

            Bug ID: 69567
           Summary: Tomcat returns 200 OK instead of 500 Internal Server
                    Error on cache eviction failure leading to application
                    errors
           Product: Tomcat 11
           Version: 11.0.1
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: yosr.hmo...@prostep.com
  Target Milestone: -------

I encountered an issue with Apache Tomcat 11.0.1 (and also v11.0.2) where
Tomcat logs a warning when it fails to evict cache entries due to insufficient
space, but instead of sending a 500 Internal Server Error, it returns a 200 OK
response. This is problematic because the resource cannot be properly served,
no content is returned, yet a 200 OK status is sent. This causes errors in the
application, as it fails to load necessary resources.

Details: When Tomcat’s cache reaches its limit, and eviction of expired cache
entries fails, Tomcat logs the warning:

"05-Feb-2025 10:31:16.231 WARNUNG [http-nio-8080-exec-2]
org.apache.catalina.webresources.Cache.getResource Unable to add the resource
at [/gui/.../.../Navigation.js] to the cache for web application [/x-gui-x]
because there was insufficient free space available after evicting expired
cache entries - consider increasing the maximum size of the cache"

However, instead of returning a 500 Internal Server Error, Tomcat still
responds with 200 OK, even when the resource cannot be served correctly from
the cache. This leads to errors in the frontend console, and the application
does not work.

The following errors appear in the browser’s developer console:

"ext-all-rtl-debug.js?_dc=1738747870964:10032 [E] [Loader] app.view.InfoView
from app/.../.../appView.js
log @ ext-all-rtl-debug.js?_dc=1738747870964:10032
logx @ ext-all-rtl-debug.js?_dc=1738747870964:10068
Ext.apply.log.log.error @ ext-all-rtl-debug.js?_dc=1738747870964:10071"

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to