"Horrible Exception: null"

419 views
Skip to first unread message

chen yang

unread,
Aug 2, 2012, 5:05:26 PM8/2/12
to xnat_di...@googlegroups.com
I am testing XNAT 1.6 on XNAT workshop virtual machine. 
After uploading one MR session images to XNAT, then click upload -> go to prearchive.
It returned "Horrible Exception: null".  

Here are the error message in the application.log

 2012-08-02 15:57:59,065 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-5] ERROR org.quartz.core.ErrorLogger - Job (prearchive-jobs.session-rebuilder threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.OutOfMemoryError: Java heap space]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.OutOfMemoryError: Java heap space
2012-08-02 16:00:59,011 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-2] ERROR org.quartz.core.JobRunShell - Job users-jobs.clear-expired-alias-tokens threw an unhandled Exception:
2012-08-02 16:01:00,246 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-2] ERROR org.quartz.simpl.SimpleThreadPool - Error while executing the Runnable:
2012-08-02 16:02:19,211 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-6] ERROR org.quartz.core.JobRunShell - Job users-jobs.clear-expired-alias-tokens threw an unhandled Exception:
java.lang.OutOfMemoryError: Java heap space
2012-08-02 16:02:19,817 [org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-6] ERROR org.quartz.core.ErrorLogger - Job (users-jobs.clear-expired-alias-tokens threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.OutOfMemoryError: Java heap space]
        at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.OutOfMemoryError: Java heap space

Herrick, Rick

unread,
Aug 2, 2012, 5:28:57 PM8/2/12
to xnat_di...@googlegroups.com

This is actually a Tomcat issue. The Tomcat configuration on the workshop VM is not tuned AT ALL. You can modify the file /etc/default/tomcat6 to configure the JVM heap settings. I’m not sure what the default state of this setting is, but what I currently have configured is:

 

JAVA_OPTS="-Djava.awt.headless=true -XX:+UseConcMarkSweepGC -Xms170m -Xmx512m -Xmn102m"

 

You can try bumping up that max value (the -Xmx option) to 1024m or something like that, but you should only do that if you set the physical memory available to the VM to 2GB or higher in your virtualization settings (i.e. VMWare or VirtualBox or whatever you’re using to run the VM).

 

The other possibility is that you might see PermGen errors. The PermGen space is actually another heap that’s used by the JVM for object allocation. When you increase your standard heap, you usually need to increase your permgen size. This uses the option:\

 

-XX:MaxPermSize= XXXm

 

I’ve read all kinds of guidelines on what that XXX number should be, but for a server under load the only thing I’ve found that’s a good solid rule is trial and error. With the PermGen space, you don’t want to just jack it way up and call it a day. That can lead to major performance degradation, as it gives the Java garbage collector too much junk to manage. So try setting that to a number, maybe 25% of your max heap space and increasing it from there as you run into PermGen errors. Don’t do this in production of course J

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xnat_discussion/-/5b3ru4KkY7QJ.
To post to this group, send email to xnat_di...@googlegroups.com.
To unsubscribe from this group, send email to xnat_discussi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xnat_discussion?hl=en.




The material in this message is private and may contain Protected Healthcare Information (PHI). If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Herrick, Rick

unread,
Aug 2, 2012, 5:29:47 PM8/2/12
to xnat_di...@googlegroups.com

BTW, that “Horrible exception” message is not ours, it’s directly from Tomcat.

chen yang

unread,
Aug 2, 2012, 5:47:05 PM8/2/12
to xnat_di...@googlegroups.com
Hi Rick, 

Yes, Tomcat's "Horrible exception" message is very funny.
I will try to do the setting as you described.  
Thanks a lot for your quick reply!

Best,
Chen
Reply all
Reply to author
Forward
0 new messages