0

I have an R code which I am trying to call over HTTP using opencpu, but for the long running code, it is getting timeout. I came across https://github.com/joelkuiper/aplomb

Unfortunately, the documentation is not detailed and I am unable to figure out how to make it work once it is deployed and the container is running.

Prabhakar
  • 402
  • 6
  • 20

1 Answers1

0

Look in the file /etc/opencpu/server.conf

You should see parameters timelimit.get and timelimit.post (values are in seconds). Increase them to something that seems reasonable for your code, and save it.

Then restart the service:

sudo service opencpu restart

Then try again - hope it works!

MDe
  • 2,478
  • 3
  • 22
  • 27
  • Thank you, could you please let me know what can be the maximum value for timelimit as R code may sometime take about 15-20 mins to complete and also waiting the user for more than min or 2 would not be the right approach. – Prabhakar Jan 31 '17 at 15:16
  • I don't know if there's a maximum but I have set it for 30 minutes in some cases and it seems to work. If you don't want the user to wait more than 2 minutes, you either need to break up your code into smaller pieces, or tell them that the processing will take a while and you will email or message them somehow when it completes. – MDe Jan 31 '17 at 22:27