Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Update recipe for using RECYCLE_FACADES flag.

...

To troubleshoot the issue:

  1. Set the following system property in Tomcat configuration:
    org.apache.catalina.connector.RECYCLE_FACADES=true
    When the above flag is set, Tomcat recycles Make sure that your Tomcat is configured to discard facades to its internal objects when request processing completes. This makes it easier to spot illegal access when it happens, instead of waiting until side effects of such access become visible. This flag Essentially, it protects Tomcat internals from misbehaving web applications.

    This feature is always on when you are running Tomcat with a Java Security Manager being enabled. Starting with Tomcat 10.0 this feature is enabled by default. It is disabled by default in earlier versions of Tomcat. The way this feature is configured differs between versions: it is controlled by an attribute on Connector element or by a system property.

    If you are running Tomcat 9.0 or earlier, do both of the following:

    - Set the following system property in Tomcat configuration:
    org.apache.catalina.connector.RECYCLE_FACADES=true

    - Add the following attribute to all Connector elements:
    discardFacades="true"

    The Connector attribute was added in Tomcat 10.0.0-M1, 9.0.31, 8.5.51 and 7.0.100. The system property is an older way to configure this feature. In case of a doubt, or if you are switching back and forth between versions while troubleshooting the issue, it is safer to configure both of them.

    This feature is also mentioned on the Security Considerations page . The flag is true when Tomcat runs with enabled Java Security Manager.
    in Tomcat documentation. You can also search the archives of the Tomcat users' mailing lists for previous discussions mentioning the RECYCLE_FACADES flag.

  2. Read about Java ImageIO issue.

...