You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sis.apache.org by "Corey Puffalt (Jira)" <ji...@apache.org> on 2026/08/28 21:13:00 UTC

[jira] [Updated] (SIS-637) EPSGFactory triggers full GCs

     [ https://issues.apache.org/jira/browse/SIS-637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Corey Puffalt updated SIS-637:
------------------------------
    Description: 
In an application using Apache SIS we noticed full garbage collections being triggered every 10 seconds. This traces to {{{}EPSGDataAccess.canClose(){}}}, which calls {{System.gc()}} whenever its {{authorityCodes}} map is non-empty, combined with the 10 second timeout {{EPSGFactory}} sets in its constructor.  Strongly recommend the {{System.gc()}} call be removed completely.  I understand it's trying to ensure some weak references are cleared but we should trust the JVM here.  Running full GCs every 10s adds a LOT of load for applications with larger heap sizes and causes noticeable pauses on multi-user web applications.  Yes, this can be mitigated by completely disabling full GCs via {{-XX:+DisableExplicitGC}} but this requires someone to discover the problem first.

The other cause was on our side due to retaining the Set returned by getAuthorityCodes() rather than copying the values (missed the warning in the javadoc). We will fix this but regardless these full GCs should really go since there's no warning or backoff.

 

  was:In an application using Apache SiS we noticed that full garbage collections were being triggered every 10s.  After doing some digging we realized this was coming from {{{}EPSGFactory{}}}.  Strongly recommend the {{System.gc()}} call be removed completely.  I understand it's trying to ensure some weak references are cleared but we should trust the JVM here.  Running full GCs every 10s adds a LOT of load for applications with larger heap sizes and causes noticeable pauses on multi-user web applications.  Yes, this can be mitigated by completely disabling full GCs via {{-XX:+DisableExplicitGC}} but this requires someone to discover the problem first.


> EPSGFactory triggers full GCs
> -----------------------------
>
>                 Key: SIS-637
>                 URL: https://issues.apache.org/jira/browse/SIS-637
>             Project: Spatial Information Systems
>          Issue Type: Bug
>    Affects Versions: 1.5, 1.6
>            Reporter: Corey Puffalt
>            Priority: Major
>
> In an application using Apache SIS we noticed full garbage collections being triggered every 10 seconds. This traces to {{{}EPSGDataAccess.canClose(){}}}, which calls {{System.gc()}} whenever its {{authorityCodes}} map is non-empty, combined with the 10 second timeout {{EPSGFactory}} sets in its constructor.  Strongly recommend the {{System.gc()}} call be removed completely.  I understand it's trying to ensure some weak references are cleared but we should trust the JVM here.  Running full GCs every 10s adds a LOT of load for applications with larger heap sizes and causes noticeable pauses on multi-user web applications.  Yes, this can be mitigated by completely disabling full GCs via {{-XX:+DisableExplicitGC}} but this requires someone to discover the problem first.
> The other cause was on our side due to retaining the Set returned by getAuthorityCodes() rather than copying the values (missed the warning in the javadoc). We will fix this but regardless these full GCs should really go since there's no warning or backoff.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)