R script in node gets stuck. No errors shown

March 29, 2019 561 views
Node.js Ubuntu 16.04

Please, see the stackoverflow thread first:

https://stackoverflow.com/questions/55409558/shelljs-execution-gets-stuck-on-digitalocean

The execution of an R script just gets stuck and there is no errors. I need to have a way of figuring out of what is going on.

1 Answer

Greetings!

I see that you were able to find the answer to this. For the benefit of future readers, I am going to paste your answer here:

So, I do not know why but it was apache2 server problem. I switched to nginx, but then RAM out of memory errors appeared which I fixed by reducing the amount of memory my R script uses:

options(java.parameters = "-Xmx6000m")

It was -Xmx8000m. Then the script was finishing correctly on the server, but on the client I saw 504 gateway timeout errors which I fixed by the solution I found here: https://asdqwe.net/blog/solutions-504-gateway-timeout-nginx/

Just created file at /etc/nginx/conf.d/timeout.conf with:

proxy_connect_timeout       3000;
proxy_send_timeout          3000;
proxy_read_timeout          3000;
send_timeout                3000;
After which it finally started working
Have another answer? Share your knowledge.