Highlighted

Webservice call results in Java heap space error

Explorer ,
Feb 18, 2019

Copy link to clipboard

Copied

Migrating to CF2018, we have noticed that our webservice calls are quickly pegging system resources and resulting in java heap space out of memory errors after a few minutes.  Increasing memory allocation results in longer periods of time before erroring out, but similar results.

Pointing at java 8 and moving tools.jar into the WEB-INF/lib directory shows successful results with near instantaneous response.

Has anyone else seen this or have any idea why java 10 would be showing this issue?

Update:

I uninstalled CF2018, reinstalled using the current installer with update 2, and then began to test using a minimally configured setup (mostly default settings).  After quite a bit of debugging, I believe I have narrowed down the problem to two things:

1.  It appears that we have a bug in our code that has been known to cause problems consuming CF published webservices.  This is outlined in the following doc, but curiously wasn't an issue for us using java 8...

https://tracker.adobe.com/#/view/CF-3581691

2.  We have been using the javax.servlet jar file for some time now.  With java 10, this seems to be causing our webservice calls to being running up the CPU and increasing java heap until a heap error occurs.  Removing this jar fixes the problem.  I have yet to determine if an updated jar is necessary.

TOPICS
Advanced techniques

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Webservice call results in Java heap space error

Explorer ,
Feb 18, 2019

Copy link to clipboard

Copied

Migrating to CF2018, we have noticed that our webservice calls are quickly pegging system resources and resulting in java heap space out of memory errors after a few minutes.  Increasing memory allocation results in longer periods of time before erroring out, but similar results.

Pointing at java 8 and moving tools.jar into the WEB-INF/lib directory shows successful results with near instantaneous response.

Has anyone else seen this or have any idea why java 10 would be showing this issue?

Update:

I uninstalled CF2018, reinstalled using the current installer with update 2, and then began to test using a minimally configured setup (mostly default settings).  After quite a bit of debugging, I believe I have narrowed down the problem to two things:

1.  It appears that we have a bug in our code that has been known to cause problems consuming CF published webservices.  This is outlined in the following doc, but curiously wasn't an issue for us using java 8...

https://tracker.adobe.com/#/view/CF-3581691

2.  We have been using the javax.servlet jar file for some time now.  With java 10, this seems to be causing our webservice calls to being running up the CPU and increasing java heap until a heap error occurs.  Removing this jar fixes the problem.  I have yet to determine if an updated jar is necessary.

TOPICS
Advanced techniques

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 18, 2019 0
Adobe Community Professional ,
Feb 18, 2019

Copy link to clipboard

Copied

Could you show us the code and the stack trace or error messages? Java 10 is significantly different from Java 8. See for example the Java version history.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 18, 2019 0
Explorer ,
Feb 19, 2019

Copy link to clipboard

Copied

Webservice call:

<cfinvoke webservice ="#variables.baseURL#/#####/OrgList.cfc?wsdl"

  method ="GetOrgList"

  username="xxxxxxx"

  password="xxxxxxx"

  returnVariable="UIOrgList">

</cfinvoke>

Webservice.log:

"Information","ajp-nio-8017-exec-3","02/18/19","17:24:33",,"Starting Web service request."

"Information","ajp-nio-8017-exec-3","02/18/19","17:24:33",,"Creating Web service proxy {url='https://##########/#####/OrgList.cfc?wsdl'}"

"Information","ajp-nio-8017-exec-9","02/18/19","17:24:36",,"Using Axis 1 framework for servicing the web service request to the endPoint https://##########/#####/OrgList.cfc."

"Information","ajp-nio-8017-exec-9","02/18/19","17:24:36",,"Deploying the CFC https://##########/#####/OrgList.cfc as a web service."

"Information","ajp-nio-8017-exec-3","02/18/19","17:24:36",,"Downloaded the wsdl https://##########/#####/OrgList.cfc?wsdl"

"Information","ajp-nio-8017-exec-3","02/18/19","17:24:36",,"Using Axis 1 for consuming the service https://##########/#####/OrgList.cfc?wsdl."

"Information","ajp-nio-8017-exec-3","02/18/19","17:39:20",,"coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:     The system is out of resources.  Consult the following stack trace for details.  java.lang.OutOfMemoryError: Java heap space  at java.base/java.util.Arrays.copyOf(Arrays.java:3688)  at java.base/java.util.ArrayList.grow(ArrayList.java:237)  at java.base/java.util.ArrayList.grow(ArrayList.java:242)  at java.base/java.util.ArrayList.add(ArrayList.java:467)  at java.base/java.util.ArrayList.add(ArrayList.java:480)  at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.iteratorOf(ZipFileSystem.java:408)  at jdk.zipfs/jdk.nio.zipfs.ZipDirectoryStream.iterator(ZipDirectoryStream.java:69)  at java.base/java.nio.file.FileTreeWalker$DirectoryNode.<init>(FileTreeWalker.java:78)  at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:310)  at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)  at java.base/java.nio.file.Files.walkFileTree(Files.java:2752)  at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:523)  at jdk.compiler/com.s.... "

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Adobe Community Professional ,
Feb 19, 2019

Copy link to clipboard

Copied

Chris, before digging any further, can you confirm simply what your cf max heap size is in cf2018 vs what you're migrating from? I've seen many miss that they had raised it on the previous version but not on the new one--and the default of 1g may simply not be enough for your code and load.

If they are the same in the new and old cf instance, tell us next what the previous version was. There may be an explanation for increases heap use, especially between cf9 and earlier as compared to cf10 and later.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Explorer ,
Feb 19, 2019

Copy link to clipboard

Copied

We have been running at 512m for CF11.  After running into this issue, I experimented with raising it to 768m (heap error after about 16mins) and even up to 2048m (heap error after about 30mins).  Just for reference, pointing CF2018 at java 8 gives me a page response in about 3 seconds.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Explorer ,
Feb 19, 2019

Copy link to clipboard

Copied

We also tried creating an extremely basic webservice call to just return "Hello World", just in case the return file size was part of the issue.  The heap space error that returned was similar, but didn't return the java.util.Arrays references:

"Information","ajp-nio-8017-exec-4","02/19/19","11:48:15",,"coldfusion.jsp.CompilationFailedException: Errors reported by Java compiler:     The system is out of resources.  Consult the following stack trace for details.  java.lang.OutOfMemoryError: Java heap space  at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.iteratorOf(ZipFileSystem.java:406)  at jdk.zipfs/jdk.nio.zipfs.ZipDirectoryStream.iterator(ZipDirectoryStream.java:69)  at java.base/java.nio.file.FileTreeWalker$DirectoryNode.<init>(FileTreeWalker.java:78)  at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:310)  at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:373)  at java.base/java.nio.file.Files.walkFileTree(Files.java:2752)  at jdk.compiler/com.sun.tools.javac.file.JavacFileManager$ArchiveContainer.<init>(JavacFileManager.java:523)  at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.getContainer(JavacFileManager.java:319)  at jdk.compiler/com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:715)  at jdk.compiler/com.sun.tools.javac.code.ClassFinder.list(ClassFinder.java:730)  at jdk.compiler/com.sun.tools.javac.code.C.... "

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Adobe Community Professional ,
Feb 19, 2019

Copy link to clipboard

Copied

Hi Chris, thanks for sharing the error messages. Your service appears to trigger a lot of file operations. We have to find out why.

Could you also share the full list of JVM arguments?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Explorer ,
Feb 19, 2019

Copy link to clipboard

Copied

-server -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Xbatch -Dcoldfusion.home={application.home} -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dcoldfusion.disablejsafe=true -Dfile.encoding=UTF8

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 19, 2019 0
Adobe Community Professional ,
Feb 20, 2019

Copy link to clipboard

Copied

Did you leave out some of the JVM flags that ColdFusion 2018 installs by default? I actually expected something like:

-server -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Xbatch -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu -Dhttps.protocols=TLSv1.1,TLSv1.2 -Dcoldfusion.disablejsafe=true -Dfile.encoding=UTF8 -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

(Beware when copy-pasting from here. This forum's software inserts arbitrary spaces into text blocks)

Please show us the original contents of the file /cfusion/bin/jvm.config.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 20, 2019 0
Explorer ,
Feb 20, 2019

Copy link to clipboard

Copied

# Arguments to VM

java.args=-server  -Xms256m -Xmx512m -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Xbatch -Dcoldfusion.home={application.home} -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dcoldfusion.disablejsafe=true -Dfile.encoding=UTF8 -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars

java.class.path={application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

# Comma separated list of shared library path

java.library.path={application.home}/lib,{application.home}/jintegra/bin,{application.home}/jintegra/bin/international,{application.home}/lib/oosdk/classes/win

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 20, 2019 0
Adobe Community Professional ,
Feb 20, 2019

Copy link to clipboard

Copied

Did you perhaps bring in your jvm.config from CF11 (which runs on Java 8 or below)? Because that doesn't look like the kind of args in a CF2018 implementation (which runs on Java 10 or above). Here's what I show, and notice things like the many --add-opens args you are missing:

java.args=-server  -Xms256m -Xmx1024m --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-modules=java.xml.ws --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/sun.util.cldr=ALL-UNNAMED --add-opens=java.base/sun.util.locale.provider=ALL-UNNAMED  -XX:+UseParallelGC -Xbatch -Djdk.attach.allowAttachSelf=true -Dcoldfusion.home={application.home} -Duser.language=en -Dcoldfusion.rootDir={application.home} -Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true -Dcoldfusion.libPath={application.home}/lib -Dorg.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER=true -Dcoldfusion.jsafe.defaultalgo=FIPS186Random -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog -Djava.util.logging.config.file={application.home}/lib/logging.properties -Djava.locale.providers=COMPAT,SPI -Dsun.font.layoutengine=icu  -Dcoldfusion.classPath={application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/lib/updates,{application.home}/lib,{application.home}/lib/axis2,{application.home}/gateway/lib/,{application.home}/wwwroot/WEB-INF/cfform/jars,{application.home}/wwwroot/WEB-INF/flex/jars,{application.home}/lib/oosdk/lib,{application.home}/lib/oosdk/classes

Curiously, BKBK seems to have been on the right track about your issue, but his lists JVM args ALSO do not show these Java 10-oriented args like add-opens.

We should also note also that there can be a difference between what one sees in their jvm.config's java.args line (like you showed, as did I) and what one sees for the same jvm args display in the CF admin "java and jvm" page.

Let us know if this gets you closer. (I would normally not propose you just take some JVM args you find and try them, as there can be drive and path differences, but I suspect you don't have the original file, though do cheeck the cfusion\bin folder. There could be some backup that CF took in the past still there.)

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 20, 2019 0
Explorer ,
Feb 20, 2019

Copy link to clipboard

Copied

I'll try this out and let you know.  Thanks Charlie!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 20, 2019 0
Adobe Community Professional ,
Feb 20, 2019

Copy link to clipboard

Copied

-Xms256m -Xmx512m

That may be too small for the work your application is doing. It certainly is too small for the G1GC collector. With G1GC I would recommend values of at least

-Xms4096m -Xmx4096m

This assumes you have sufficient RAM. If you haven't, then change the collector to

-XX:+UseParallelGC

and use the value you mentioned before:

-Xms2048m -Xmx2048m

Lastly, you miss a flag which ColdFusion 2018 adds:

-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize=true

It improves performance.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 20, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Charlie+Arehart  wrote

Curiously, BKBK seems to have been on the right track about your issue, but his lists JVM args ALSO do not show these Java 10-oriented args like add-opens.

You're right, Charlie. I indeed noticed the missing 'add-opens'. But I ignored them because I think they are not relevant to the heap-space issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

Ok, a few things.

1) Chris, did you get to check yet?

2) BKBK, can you elaborate on your assertion of a 4g min for g1gc? I'd not heard or seen it (and couldn't find it with several mins searching just now) .

3) As for those Java 10 args you failed to mention, I mentioned them simply because they ARE in a default cf2018 jvm.config, and neither of you mentioned them. I'm not saying they WILL affect heap use, but they may.

4) But yep, it would SEEM that the 512 Chris has set is "not enough", but then he'd wonder reasonably, why? Could it be the change of jvm (since 2018 comes on Java 10, or on Java 11 as of last week's installer refresh)? We'd not expect that.

Could it be due to the change of cf versions itself? Again, I'd not heard of that causing higher heap yet.

4a) I will add FWIW that I did learn this week that cf2018 slipped in a change about the cfml caching functions /tags when REGIONS are used. It used to be that such regions were server-wide. Now they are app-specific, so if you have two or more apps using a single region  they no longer SEE each other  but it also means if both apps populate it when empty, you'd get double the heap use. Are you doing that, Chris?

5) As for what might be causing high heap, I would bet it's NOT the ws calls, themselves, if all things are otherwise normal about your setup.

Instead, I'd think SOMETHING has your heap use higher, even before the ws calls, and you would want to prove that. If you are using the cf2018 PMT, it can tell you. So can FusionReactor, if you have it or get its free 14 day trial  There is also code out on the web to simply view the current heap usage in bytes, as well as to force GCs to know what the REAL use is before such a test of the web svc.

Hope that helps.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Explorer ,
Feb 21, 2019

Copy link to clipboard

Copied

I tried out these jvm argument changes, but don't see any difference in results.  I also switched to ParallelGC and even tried webservice version 2, but those didn't seem to help either.  It still looks like everything is running smoothly until the wsdl has been returned and it begins to process the document.

Feb 21, 2019 08:26:28 AM Information [ajp-nio-8017-exec-2] - Creating Web service proxy {url='https://XXXXXXX/ATS-UI/Hello.cfc?wsdl'}

Feb 21, 2019 08:26:29 AM Information [ajp-nio-8017-exec-3] - Using Axis 2 framework for servicing the web service request to the endPoint https://XXXXXXX/ATS-UI/Hello.cfc.

Feb 21, 2019 08:26:29 AM Information [ajp-nio-8017-exec-2] - Downloaded the wsdl https://XXXXXXX/ATS-UI/Hello.cfc?wsdl

Feb 21, 2019 08:26:29 AM Information [ajp-nio-8017-exec-2] - Using Axis 2 for consuming the service https://XXXXXXX/ATS-UI/Hello.cfc?wsdl.

I keep coming back to wondering why this would work when pointing at java 8, but then fail for java 10.  It doesn't seem like a resource issue, but I was hoping one of those arguments would prove to be the difference.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Charlie+Arehart  wrote

2) BKBK, can you elaborate on your assertion of a 4g min for g1gc? I'd not heard or seen it (and couldn't find it with several mins searching just now) .

G1GC is especially suitable for multiprocessor servers having a heap size of 6GB or larger.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

BKBK:

  1. the page you point to doesn't say what you do on the line with the hyperlink, "G1GC is especially suitable for multiprocessor servers having a heap size of 6GB or larger." Did you mean to imply that it does? Or maybe you meant to link to some other page.
  2. It also doesn't say what you did, that Chris's 512m heap was "certainly is too small for the G1GC collector. With G1GC I would recommend values of at least -Xms4096m -Xmx4096m"
  3. Indeed, all that page says (with regard to sizing) is that, "The first focus of G1 is to provide a solution for users running applications that require large heaps with limited GC latency. This means heap sizes of around 6 GB or larger, and a stable and predictable pause time below 0.5 seconds."


So are we perhaps misreading you? Were you really meaning to say that you think someone running CF on a JVM with the G1GC enabled and a smaller heap would be in for trouble? It doesn't seem so, from any of this info.

Again, if you have info to clarify otherwise, please do share. I'm not saying any of this to bash or embarrass you. It's simply that use of the G1GC is new to most people (though it's been around for years), and we can all stand to learn better as people try it with CF especially.

(And for those following along, note that the G1GC is not default for CF, not even in CF2018--as some even at Adobe have said. CF still still puts the useparallelgc arg in place, even in CF2018, so this issue does affect only those who DO put the UseG1GC arg in place.)

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Charlie+Arehart  wrote

BKBK:

  1. the page you point to doesn't say what you do on the line with the hyperlink, "G1GC is especially suitable for multiprocessor servers having a heap size of 6GB or larger." Did you mean to imply that it does? Or maybe you meant to link to some other page.
  2. It also doesn't say what you did, that Chris's 512m heap was "certainly is too small for the G1GC collector. With G1GC I would recommend values of at least -Xms4096m -Xmx4096m"
  3. Indeed, all that page says (with regard to sizing) is that, "The first focus of G1 is to provide a solution for users running applications that require large heaps with limited GC latency. This means heap sizes of around 6 GB or larger, and a stable and predictable pause time below 0.5 seconds."

The message is clear:

G1GC is recommended for multiprocessor servers having large heap size. By large is meant a heap size from, say, 6 GB.

You may of course use G1GC with a smaller heap size, on a single processor. But it is likely that that wont be optimal. This is a particularly relevant point here.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

Um, ok then.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Charlie+Arehart  wrote

(And for those following along, note that the G1GC is not default for CF, not even in CF2018--as some even at Adobe have said. CF still still puts the useparallelgc arg in place, even in CF2018, so this issue does affect only those who DO put the UseG1GC arg in place.)

The default garbage collector in ColdFusion 2018 is ParallelGC. (Perhaps to maintain backward-compatibility?)

However from Java 9 onwards, the default collector in the Java Virtual Machine is G1GC.

The most recent versions of ColdFusion, 2016 update 8 and 2018 update 2, both support Java 11.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

That may help to readers to hear. It doesn't counter what I said, (and I had addressed this point--that while Java defaults to it, CF as installed does not--in part 2 of my hidden gems in CF2018 series elsewhere here. But didn't think to bother to repeat it here.) Glad you got it out here, if you felt it warranted.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Explorer ,
Feb 21, 2019

Copy link to clipboard

Copied

In my case, however, I have proven that the webservices function properly under ColdFusion 2018 with G1GC and a max heap size of less than 1g, provided that I am using java 8.  Nothing I have tried has been successful with java 10.  I haven't tried 11, but that might be my next attempt.

I really don't believe this to be an issue of resources on the machine but more of a matter of how the document is being compiled/consumed under java 10.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 1
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

Chris, sorry, I missed your reply this morning. I kept seeing BKBk's subsequent replies about the jvm matters and I had just wanted help with that if I might.

So about your new comments here, I think you may have provided the key to unlock the door (to solving this).

I'm betting it's that the stubs (the jvm classes that cf built to represent the called web services) simlly need to be recompiled for the new Java version.

There are 3 ways to do it:

- stop cf, go into the cfusion/stubs folder a d remove or move the folders there (one for each called web service) and restart cf

-  Go into the cf admin, web svcs page, and if you see the web svc in question there, hit the refresh button next to it

- go to your code that's calling the web svc, and add the refreshwsdl attribute or function arg. You do NOT want to leave that in place for every subsequent call.  I have blog posts with more detail on all that if needed, from when it was added in cf8.

Let us know if that gets you going.

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Explorer ,
Feb 21, 2019

Copy link to clipboard

Copied

Charlie,

No dice, but I definitely think this may be moving in the right direction.  I see the stub files recreated when I try to make another webservice call, but the result is the same.  I would love to see what or where the job is stuck processing, but logs aren't giving much of anything.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Adobe Community Professional ,
Feb 21, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/chris+hawk_448  wrote

In my case, however, I have proven that the webservices function properly under ColdFusion 2018 with G1GC and a max heap size of less than 1g, provided that I am using java 8.  Nothing I have tried has been successful with java 10.  I haven't tried 11, but that might be my next attempt.

I really don't believe this to be an issue of resources on the machine but more of a matter of how the document is being compiled/consumed under java 10.

Hi Chris, your summary is suggestive. The cause just might be that Java 10 processes the code in OrgList.cfc differently. Could you share the code, if necessary, by private messaging?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 21, 2019 0
Explorer ,
Feb 22, 2019

Copy link to clipboard

Copied

Here is the code for a simple call that is failing for us in the same way:

Hello.cfc

<cfcomponent displayname="Hello">

  <cffunction name="getHelloWorld" access="remote" returntype="string" output="no">

    <cfreturn "Received hello from secure web service">

  </cffunction>

</cfcomponent>

HelloClient.cfm

<cftry>

  <cfinvoke webservice ="#variables.baseURL#/ATS-UI/Hello.cfc?wsdl"

    method ="getHelloWorld"

    username="#####"

    password="#####"

    returnVariable="greeting">

  </cfinvoke>

  <cfdump var="#greeting#">

  <cfcatch type="Any">

    <h2 class="importanttext">Error:</h2>

    <cfoutput>

      <p>#cfcatch.errorCode# - #cfcatch.message#</p>

      <p>#cfcatch.detail#</p>

      <p>Additional details:</p>

      <cfset ExceptionMsg = "">

      <cfloop index = i from = 1

        to = #ArrayLen(CFCATCH.TAGCONTEXT)#>

        <cfset sCurrent = #CFCATCH.TAGCONTEXT#>

        <CFSET tmpMsg = "Line, Col: (#sCurrent['LINE']#,#sCurrent['COLUMN']#)<br>

        Template:   #sCurrent['TEMPLATE']#">

        <cfset ExceptionMsg = "#VARIABLES.ExceptionMsg# #chr(13)#" & "#variables.tmpMsg#">

      </cfloop>

    </cfoutput>

  </cfcatch>

</cftry>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 22, 2019 0
Adobe Community Professional ,
Feb 23, 2019

Copy link to clipboard

Copied

Hi https://forums.adobe.com/people/chris+hawk_448 , thanks for the test code.

There were no problems when I ran it. My system is ColdFusion 2018 + Java 10.0.2. The likely cause of your problem is therefore something else in your environment, something outside the code,.

I suspect the webservice version. That is, the Axis version. Mine is 2 whereas yours is 1.

Go to the webservice page in the ColdFusion Administrator. Select 2 as the web service version, then click on the button to update it.

To be sure add two more attributes, wsversion and refreshwsdl, to your cfinvoke tag:

<cfinvoke webservice ="#variables.baseURL#/ATS-UI/Hello.cfc?wsdl"

    method ="getHelloWorld"

    username="#####"

    password="#####"

    returnVariable="greeting" wsversion="2" refreshwsdl="true" >

You may remove the refreshwsdl later, after you get the service to work.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 23, 2019 0
Adobe Community Professional ,
Feb 23, 2019

Copy link to clipboard

Copied

A few thoughts for you both.

Bkbk, I had proposed that (refresh of the wsdl, any of 3 ways) in my last comment, and Chris said it had not helped. But I'm with you in saying this feels like an environmental thing for him.

So Chris, first, had you applied any of the updates to your cf2018? If so, have you confirmed there were 0 errors, in the table tracking successes and errors near the top of the install log for the update, in the cfusion/hf-updates folder? That's always important to check after an update.

Second, I had asked on the 21st if you had any monitoring of heap use, like fr or the pmt. My goal then was to see if you see heap use rising all day.

But now I'll ask: if you DO have the PMT implemented and this instance is being monitored by it, try disabling that (in the PMT), then run your tests. (And do restart CF if you found heap had risen all day and was now high, so that you have a clear starting point of comparison with the PMT monitoring now disabled.)

My point here is that I have seen at least one problem caused BY the the fact that a CF instance was being monitored by the PMT. (it was related to errors in cfthread  so not related to this) .

Still, the PMT DOES in fact monitor all calls OUT of CF--whether db calls, cfhttp calls, web svc calls, and more--so it COULD be somehow mistakenly causing CF to hold on to objects related to the ws call, in effect causing a memory leak.

So taking it out of the equation would be worth a shot if you do have it enabled for this instance. If not--and if you confirm there were also no errors in the update install log--then I think I'm out of ideas for now. 🙂

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 23, 2019 0
Adobe Community Professional ,
Feb 23, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/Charlie+Arehart  wrote

A few thoughts for you both.

Bkbk, I had proposed that (refresh of the wsdl, any of 3 ways) in my last comment, and Chris said it had not helped.

Hi Charlie, my suggestion is for Chris to change the webservice version from 1 to 2.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Feb 23, 2019 0