I faced a similar issue today (see below from .log file):
Warning in system(command) : system call failed: Cannot allocate memory
Warning: Error in : pandoc document conversion failed with error 127
Stack trace (innermost first):
105: pandoc_convert
104: convert
103: render
102: discover_rmd_resources
101: find_external_resources
100: copy_render_intermediates
99: output_format$intermediates_generator
98: <Anonymous>
97: do.call
96: contextFunc
95: .getReactiveEnvironment()$runWith
94: shiny::maskReactiveContext
93: <reactive>
82: doc
81: shiny::renderUI
80: func
79: origRenderFunc
78: output$__reactivedoc__
3: <Anonymous>
2: do.call
1: rmarkdown::run
I too am running Shiny Server via Ubuntu on an EC2 instance, specifically t2.micro
. I solved this issue by following the top-voted answer here: How do you add swap to an EC2 instance?
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo chmod 600 /var/swap.1
sudo /sbin/swapon /var/swap.1
Add to /etc/fstab
:
/var/swap.1 swap swap defaults 0 0
In short, you can create swap (memory) space on your EBS (since t2.micro
instances don't have ephemeral storage) and this should alleviate your memory issue (without having to move up to a larger EC2 instance).
free
actually showed the swap space being used) – Heated