qiime2 / q2-dada2

QIIME 2 plugin wrapping DADA2
BSD 3-Clause "New" or "Revised" License
19 stars 36 forks source link

Add an explicit error for return code -9 #86

Open ebolyen opened 6 years ago

ebolyen commented 6 years ago

Current Behavior This seems to be always be a SIGKILL event which is almost always because of an OOM error.

Proposed Behavior It is probably worth just catching and raising an error about SIGKILL/Memory when it happens.

benjjneb commented 6 years ago

Why are these OOM errors happening so much in the Q2 plugin? We have rarely gotten such reports on the R side. I think the only times I remember it happening are when people were using 32-bit R.

ebolyen commented 6 years ago

I suspect a lot of people are using VirtualBox, which needs to be configured ahead of time to have an even remotely reasonable amount of memory.

benjjneb commented 6 years ago

Ah, that makes sense.

So to implement this, the -9 exit code would need to be caught from Python where it makes the Rscript call?

ebolyen commented 6 years ago

Yup, just like this case: https://github.com/qiime2/q2-dada2/blob/master/q2_dada2/_denoise.py#L128-L133