While running a pipeline, Nextflow told me that
ERROR ~ Error executing process > 'SAMTOOLS_FIXMATE (14870)'
Caused by:
Java heap space
-- Check '.nextflow.log' file for details
The log file contains a nice stack trace:
May-19 17:59:32.998 [Task monitor] DEBUG nextflow.processor.TaskProcessor - Handling unexpected condition for
task: name=SAMTOOLS_FIXMATE (14870); work-dir=/scratch/nf/work/bc/6725b85c39ac01b40916619b1f70f0
error [org.codehaus.groovy.runtime.InvokerInvocationException]: java.lang.OutOfMemoryError: Java heap space
May-19 18:01:16.154 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'SAMTOOLS_FIXMATE (14870)'
Caused by:
Java heap space
org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.OutOfMemoryError: Java heap space
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:348)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1333)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:645)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:82)
at nextflow.executor.AbstractGridExecutor$_getQueueStatus_closure2.doCall(AbstractGridExecutor.groovy:330)
at nextflow.executor.AbstractGridExecutor$_getQueueStatus_closure2.call(AbstractGridExecutor.groovy)
at nextflow.util.Throttle.cache(Throttle.groovy:224)
at nextflow.util.Throttle.cache(Throttle.groovy:208)
at nextflow.executor.AbstractGridExecutor.getQueueStatus(AbstractGridExecutor.groovy:329)
at nextflow.executor.AbstractGridExecutor.checkStartedStatus(AbstractGridExecutor.groovy:375)
at nextflow.executor.GridTaskHandler.isStarted(GridTaskHandler.groovy:448)
at nextflow.executor.GridTaskHandler.checkIfRunning(GridTaskHandler.groovy:429)
at nextflow.processor.TaskPollingMonitor.checkTaskStatus(TaskPollingMonitor.groovy:644)
at nextflow.processor.TaskPollingMonitor.checkAllTasks(TaskPollingMonitor.groovy:573)
at nextflow.processor.TaskPollingMonitor.pollLoop(TaskPollingMonitor.groovy:443)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1333)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:645)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:628)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:82)
at nextflow.processor.TaskPollingMonitor$_start_closure2.doCall(TaskPollingMonitor.groovy:318)
at nextflow.processor.TaskPollingMonitor$_start_closure2.call(TaskPollingMonitor.groovy)
at groovy.lang.Closure.run(Closure.java:505)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.OutOfMemoryError: Java heap space
May-19 18:01:56.761 [Task monitor] DEBUG nextflow.Session - Session aborted -- Cause: java.lang.OutOfMemoryError: Java heap space
Any idea of which could be the cause? This pipeline have been running for some months now without any issue like this