'Container did not respond in time' but no errors when running it 'manually'


#1

Hi,

I am trying to deploy an app of my own using ShinyProxy.
My application.yml file includes the following:

apps:
- name: euler
display-name: Euler
docker-cmd: [“R”, “-e shiny::runApp(’/root/euler’)”]
docker-image: moliveira/my-euler
groups: scientists
- name: my-app
display-name: My app
docker-cmd: [“R”, “-e shiny::runApp(’/root/app’)”]
docker-image: moliveira/myapp
groups: scientists

Where moliveira/my-euler is an image I built from your shinyproxy-template and moliveira/myapp is a very similar image with the files needed for running my app in a folder named app in place of the euler folder (I also made the appropriate changes in the Dockerfile by adding needed packages and changing folder names).

The Euler app works fine (though it throws a few warnings that is is unresponsive at the start), so it doesn’t seem to be a problem with a firewall. But the container does not seem to respond in time when I try to run my app. The following error appears on the terminal (sometimes before it reaches the 20/20 try):

2016-12-21 13:54:00.771 ERROR 11017 — [ XNIO-2 task-10] io.undertow.request : UT005023: Exception handling request to /app/my-app

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is eu.openanalytics.ShinyProxyException: Container did not respond in time

This is happening even though no errors are thrown when I run it independently of shinyproxy using

sudo docker run -it -p 3838:3838 moliveira/myapp R -e “shiny::runApp(’/root/app’)”

which, after loading all the packages I need (this takes a while), ends with

Listening on http://0.0.0.0:3838

Can you tell me if I am doing something wrong? Is there anything else that I can try? If you need any more information from me, just ask.

Thank you in advance,
M Oliveira


#2

Hi,

Exactly how long does it take to launch your container manually?
ShinyProxy is currently set up to wait approximately 10sec before throwing the “Container did not respond in time” exception. It sounds like making this value configurable would help in your case.

Regards,
Frederick


#3

Hi,

Thanks for such a quick response!
It seems to take between 5 and 7 seconds to launch the container manually.
I’m not sure if this is the issue causing me problems but it would still probably be good if that wait time was configurable.

Best regards,
Mariana


#4

Hi @moliveira,

ShinyProxy now (version 0.8.6) has a configurable timeout value for ‘container did not respond in time’ in a new field container-wait-time with default value of 20000 (20 seconds). See https://shinyproxy.io/downloads/

Hope this is useful!

Best,
Tobias


#5

Thank you! It is definitely a useful feature!
The problem with my app ended up being not just the wait time, but also that one of the required packages (loaded on global.R) depended on a specific debian library that I had not installed in the docker image. No error messages were being displayed when running the docker image separately from ShinyProxy, though, so it was not easy to pinpoint the problem.

Again, thank you for listening to the users and continuing to improve ShinyProxy!

Best,
Mariana