This shows you the differences between two versions of the page.

Link to this comparison view

litespeed_wiki:other-ext-apps:rails-troubleshooting [2015/07/29 13:53] (current)
Michael Alegre created
Line 1: Line 1:
 +====== Steps to trouble shoot rails application errors under LiteSpeed ======
 +If your get errors from a rails application under LSWS, please try the following trouble shooting steps:
 +  * Make sure the rails application works well under WEBrick or mongrel running as the user who own the application.
 +  * Some Rails application depends on certain environment variables, LiteSpeed only set "​PATH"​ to "/​usr/​local/​bin:/​usr/​bin"​ by default, all other shell environment variables are stripped, you may need to set extra environment vairables under "​Server"​->"​Ruby Rails" tab matching that are under your shell envirnment. For example, RESTful route depends on "​HOME"​ environment variable. ​
 +  * Double check file permissions for your rails application directory.
 +  * Make sure Memory and process limits have been set high enough under "​Server"​->"​Ruby Rails" tab.
 +  * Check Rails log file, LSWS stderr.log in addition to error.log under lsws/logs directory.
 +  * Try reinstalling ruby-lsapi via gem or manually if you found anything abnormal in stderr.log
 +  * Check your DB configuration for the mode Rails running as, switching between "​Production"​ and "​Development"​ mode.
 +  * Turn on LSWS debug logging by change "Debug Level" to "​High"​.
 +  * strace the rails process, locate the PID of ruby process with command "ps -ef | grep ruby", then strace them with command like "​strace -p <​pid_of_ruby_Process>"​. You should strace the child ruby process which actually handle the request.
  • Admin
  • Last modified: 2015/07/29 13:53
  • by Michael Alegre