Shiny-server Error

96 views
Skip to first unread message

Abdur Rehman Raja

unread,
Oct 18, 2016, 10:32:56 AM10/18/16
to Shiny - Web Framework for R
Hi,

I keep receiving this error, everytime I try to start my shiny app:
-bash: line 1: 2026 Killed R --no-save --slave -f \/opt\/shiny-server\/R\/SockJSAdapter\.R

I have 3 other apps that work perfectly fine on the server. My app works when I run it locally, but outputs this error when I upload on the server. Any help would be appreciated.

Thanks, 
Abdur

Joe Cheng

unread,
Oct 18, 2016, 11:02:43 AM10/18/16
to Abdur Rehman Raja, Shiny - Web Framework for R
Where do you see this error? Right in the browser?

Can you send along the contents of /var/log/shiny-server.log and anything relevant in /var/log/shiny-server/*.log?

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/a13fc153-458c-4a4b-87a4-2a00bfc3fdb2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Brown

unread,
Apr 15, 2017, 5:37:16 PM4/15/17
to Shiny - Web Framework for R, arraj...@gmail.com
I have a similar problem with the Shiny sever on a micro EC2 instance. 

The chrome browser throws a JS error with the following error in the console: 

Loading required package: NLP
-su: line 1:  1637 Killed                  R --no-save --slave -f \/opt\/shiny-server\/R\/SockJSAdapter\.R

The contents of /var/log/shiny-server.log is the same as above.

The contents of my config file is the following:

# Instruct Shiny Server to run applications as the user "shiny"

run_as shiny;

# Define a server that listens on port 3838

server {

listen 3838;

# Define a location at the base URL

location / {

# Host the directory of Shiny Apps stored in this directory
site_dir /var/shiny-server/www;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.

directory_index off;
app_init_timeout 250;

}

}

Any one else run into a similar problem?

Thanks

Joe Cheng

unread,
Apr 16, 2017, 12:25:32 PM4/16/17
to Andrew Brown, Shiny - Web Framework for R, arraj...@gmail.com
Sounds like you might be running out of memory. You can type dmesg to see the kernel log, if it's memory you should see something like "Out of memory: Killed process nnn".

Abdur Rehman Raja

unread,
Apr 16, 2017, 1:44:46 PM4/16/17
to Shiny - Web Framework for R
For me it was a memory issue, try increasing your memory. If that doesn't work try increasing the app_init_timeout. Its possible that your app is taking too long to load and after the set time it kills the app.

Andrew Brown

unread,
Apr 16, 2017, 7:10:34 PM4/16/17
to Shiny - Web Framework for R, brown.a...@gmail.com, arraj...@gmail.com
Yup it was a memory issue.

Increasing the size of the instance solved the problem.

Thanks!
Reply all
Reply to author
Forward
0 new messages