Skip to content

Commit

Permalink
LDEV-1598 - remove it
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed May 21, 2024
1 parent 673b4d4 commit caae135
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 49 deletions.
23 changes: 0 additions & 23 deletions core/src/main/java/lucee/runtime/config/ConfigServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -492,30 +492,7 @@ public Resource getSecurityDirectory() {

@Override
public void checkPermGenSpace(boolean check) {
int promille = SystemUtil.getFreePermGenSpacePromille();

long kbFreePermSpace = SystemUtil.getFreePermGenSpaceSize() / 1024;
int percentageAvailable = SystemUtil.getPermGenFreeSpaceAsAPercentageOfAvailable();

// Pen Gen Space info not available indicated by a return of -1
if (check && kbFreePermSpace < 0) {
if (countLoadedPages() > 2000) shrink();
}
else if (check && percentageAvailable < permGenCleanUpThreshold) {
shrink();
if (permGenCleanUpThreshold >= 5) {
// adjust the threshold allowed down so the amount of permgen can slowly grow to its allocated space
// up to 100%
setPermGenCleanUpThreshold(permGenCleanUpThreshold - 5);
}

}
else if (check && kbFreePermSpace < 2048) {
System.gc();
if ((SystemUtil.getFreePermGenSpaceSize() / 1024) < 2048) {
shrink();
}
}
}

private void shrink() {
Expand Down
19 changes: 0 additions & 19 deletions core/src/main/java/lucee/runtime/engine/Controler.java
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,6 @@ private void control(CFMLFactoryImpl[] factories, boolean firstRun, Log log) {
}
}

// every hour
if (doHour) {
try {
configServer.checkPermGenSpace(true);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
if (log != null) log.error("controler", t);
}
}

for (int i = 0; i < factories.length; i++) {
control(factories[i], do10Seconds, doMinute, doHour, firstRun, log);
}
Expand Down Expand Up @@ -495,14 +484,6 @@ private void control(CFMLFactoryImpl cfmlFactory, boolean do10Seconds, boolean d
if (log != null) log.error("controler", t);
}
}

try {
configServer.checkPermGenSpace(true);
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
if (log != null) log.error("controler", t);
}
}
catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
Expand Down
5 changes: 0 additions & 5 deletions core/src/main/java/lucee/runtime/op/Caster.java
Original file line number Diff line number Diff line change
Expand Up @@ -3586,11 +3586,6 @@ public static PageException toPageException(final Throwable t, boolean rethrowIf
}

}
if (t instanceof OutOfMemoryError) {
ThreadLocalPageContext.getConfig().checkPermGenSpace(true);
}
// Throwable cause = t.getCause();
// if(cause!=null && cause!=t) return toPageException(cause);
return NativeException.newInstance(t, rethrowIfNecessary);
}

Expand Down
2 changes: 1 addition & 1 deletion loader/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">

<property name="version" value="6.1.0.152-SNAPSHOT"/>
<property name="version" value="6.1.0.153-SNAPSHOT"/>

<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
Expand Down
2 changes: 1 addition & 1 deletion loader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.lucee</groupId>
<artifactId>lucee</artifactId>
<version>6.1.0.152-SNAPSHOT</version>
<version>6.1.0.153-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Lucee Loader Build</name>
Expand Down

0 comments on commit caae135

Please sign in to comment.