Copy link to clipboard
Copied
Hello,
We have a process that parses a large xml file from a web service. The xml data has recently gotten a little larger, and now we are running into this error:
Java heap space null <br>The error occurred on line -1.
Is this a configuration issue? how do we get around this problem?
Copy link to clipboard
Copied
Some more details would be good. OS and CF 32 or 64 bit? CF version and edition? Version of Java that CF is using?
What else that can be handy would be to enable JVM logging and run the application that leads to the crash then inspect the log file for where the heap is having an problem.
HTH, Carl.
Copy link to clipboard
Copied
We're on a windows 64 bit server running CF10. i saw that our max heap was at 512. should i try moving this to 1024, or will this create other problems?
here is some more on the error:
Error - struct | ||||||||||||
Browser | CFSCHEDULE | |||||||||||
DateTime | {ts '2012-09-29 06:30:29'} | |||||||||||
Diagnostics | Java heap space null <br>The error occurred on line -1. | |||||||||||
GeneratedContent | [empty string] | |||||||||||
HTTPReferer | [empty string] | |||||||||||
Mailto | [empty string] | |||||||||||
Message | Java heap space | |||||||||||
QueryString | [empty string] | |||||||||||
RemoteAddress |
| |||||||||||
RootCause |
| |||||||||||
StackTrace |
| |||||||||||
TagContext |
| |||||||||||
Template | /(removed for security reasons) | |||||||||||
Type |
|
Form - struct [empty] |
URL - struct [empty] |
struct | |
AUTH_PASSWORD | [empty string] |
AUTH_TYPE | (removed for security reasons) |
AUTH_USER | (removed for security reasons) |
CERT_COOKIE | [empty string] |
CERT_FLAGS | [empty string] |
CERT_ISSUER | [empty string] |
CERT_KEYSIZE | [empty string] |
CERT_SECRETKEYSIZE | [empty string] |
CERT_SERIALNUMBER | [empty string] |
CERT_SERVER_ISSUER | [empty string] |
CERT_SERVER_SUBJECT | [empty string] |
CERT_SUBJECT | [empty string] |
CF_TEMPLATE_PATH | (removed for security reasons) |
CONTENT_LENGTH | 0 |
CONTENT_TYPE | [empty string] |
CONTEXT_PATH | [empty string] |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | off |
HTTPS_KEYSIZE | [empty string] |
HTTPS_SECRETKEYSIZE | [empty string] |
HTTPS_SERVER_ISSUER | [empty string] |
HTTPS_SERVER_SUBJECT | [empty string] |
HTTP_ACCEPT | [empty string] |
HTTP_ACCEPT_ENCODING | deflate;q=0 |
HTTP_ACCEPT_LANGUAGE | [empty string] |
HTTP_CONNECTION | close |
HTTP_COOKIE | [empty string] |
HTTP_HOST |
|
HTTP_REFERER | [empty string] |
HTTP_USER_AGENT | CFSCHEDULE |
PATH_INFO | [empty string] |
PATH_TRANSLATED | (removed for security reasons) |
QUERY_STRING | [empty string] |
REMOTE_ADDR |
|
REMOTE_HOST |
|
REMOTE_USER | (removed for security reasons) |
REQUEST_METHOD | GET |
SCRIPT_NAME | (removed for security reasons) |
SERVER_NAME |
|
SERVER_PORT | 80 |
SERVER_PORT_SECURE | 0 |
SERVER_PROTOCOL | HTTP/1.1 |
SERVER_SOFTWARE | Microsoft-IIS/7.5 |
WEB_SERVER_API | [empty string] |
Copy link to clipboard
Copied
Sure set the max heap bigger. What size depends. 1024Mb might even be a bit small on 64 bit. How much RAM does the server have? The MaxPermSize can also be small 192Mb so also consider doubling that.
JVM logging would give a better idea as to actual values to use. Sometimes setting correct values for min heap and PermSize is just as important as maximum.
HTH again, Carl.
Copy link to clipboard
Copied
You probably want to know more about what these memory values are and indeed how do CF / Java use such. I did a talk a couple years back that discusses much of that detail. While versions have changed from what was discussed (ie CF10 and Java 7 released) the way Java is using memory has not changed.
Regards, Carl.