Skip to main content
Participant
April 11, 2008
Question

java.lang.OutOfMemoryErro

  • April 11, 2008
  • 1 reply
  • 458 views
When using this basic command, intermittently I get the following error. Usually when I reach between 300 - 400 files or the file grows to greater than 180mb.

Also when merging files I see that it randomly grabs files with no rhyme or reason from the directory. It there a way to sort the merge without using cfdirectory and looping through the files?

HERE's the code I'm having issues with:
<CFPDF action="merge" directory="c:\backoffice\print\1" destination="c:\backoffice\send\print\1.pdf">

HERE's the ERROR Ireceive randomly:

500
ROOT CAUSE:
java.lang.OutOfMemoryError: GC overhead limit exceeded


javax.servlet.ServletException: ROOT CAUSE:
java.lang.OutOfMemoryError: GC overhead limit exceeded

at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:70)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    This topic has been closed for replies.

    1 reply

    April 14, 2008
    For the error: try adding -XX:-UseGCOverheadLimit in jvm options, restart the server and run your code. It should fix your problem.

    As for ordering your merge, you can use
    <CFPDF action="merge" directory="c:\backoffice\print\1" destination="c:\backoffice\send\print\1.pdf" order="name" ascending="false" >

    order can be name or time. By default AFAIK it should be order by name in descending order, but i may be wrong.