You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sis.apache.org by "Martin Desruisseaux (Jira)" <ji...@apache.org> on 2026/10/09 18:03:00 UTC

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

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

Martin Desruisseaux closed SIS-637.
-----------------------------------

> 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
>            Assignee: Martin Desruisseaux
>            Priority: Major
>             Fix For: 1.7
>
>
> 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)