Troubleshooting
Q: Plots are not rendering and the cgi seems to hang.
A: Plot rendering requires that the cgi get the data from the database and write the data to the html directory. Then the Tomcat servlet reads the data from the html dir and sends it to Rserve. Rserve renders the plot, then sends the pdf back to the html dir where the cgi embeds it into the html page. A quirk I have found on AWS is that periodically the plots will fail to render.
I just noticed that the rserve was configured with the IP for the AWS instance, not the redirect alias so I updated that. Hopefully, it will be more stable.
steps to restart Rserve
/usr/bin/sudo service httpd stop /usr/bin/sudo service tomcat6 stop /usr/bin/sudo killall Rserve /usr/bin/sudo /disk1/src/rserve/./startRservecmdVM /usr/bin/sudo service tomcat6 start /usr/bin/sudo service httpd start
10/08/2015
The Rserve seems to still be flakey on AWS. Not sure if its due to Tomcat as the internal server uses JBoss without issues. Added a cron job to shutdown the Rsever every day at midnight Pacific time and restart 2 minutes later.