Forum OpenACS Q&A: Java Out of memory errors.

Collapse
Posted by Dan Wickstrom on
Any java gurus out there know what the usual fix is when encountering an out-of memory error in java? I'm sending a large attachment (~2.5 Meg) using webmail and the queue processing routine bombs out with an out of memory error. I'm using the blackdown 1.1.7 version of java on a Redhat 6.0 machine. I can see that there are some command line arguments for setting the initial and max heap sizes, but I haven't had any luck with those.

Here's a traceback:

Message Parsing failed
java.lang.OutOfMemoryError: 
	at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java)
	at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:358)
	at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:153)
	at MessageParser.dumpPart(MessageParser.java:389)
	at MessageParser.parseMIME(MessageParser.java:348)
	at MessageParser.parseMessageFromFile(MessageParser.java:177)
	at MessageParser.processQueue(MessageParser.java:102)
	at MessageParser.(MessageParser.java:53)
	at MessageParser.main(MessageParser.java:473)
    while executing
"exec "$bindir/wm_process_queue""
    (procedure "wm_process_queue" line 4)