The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ruby on Rails app randomly stopping

Discussion in 'General Discussion' started by CrunchyToast, Jan 25, 2012.

  1. CrunchyToast

    CrunchyToast Active Member

    Joined:
    May 13, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Yakima, WA
    cPanel Access Level:
    DataCenter Provider
    While using an app (ChiliProject) the app randomly stops working about every 10 minutes or so. It only appears to shut down when I'm using the app, but not when the app is just idle (as far as I've seen). I have ran /scripts/installruby --force and forced an update to Mongrel. Not sure which logs to gather exactly to post in here for what might be needed to help troubleshoot the issue.


    Code:
    # rails -v
    Rails 2.3.14
    
    # ruby -v
    ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
    Edit: After the app stops, I can click start and it will begin to run again until the next shutdown.

    Thanks in advance!
     
    #1 CrunchyToast, Jan 25, 2012
    Last edited: Jan 26, 2012
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please check the logs at /home/username/rails_apps/appname/log location where username is the cPanel username, appname is the Rails application name. There should be either a development.log or production.log file (pick whichever is being used by your application) as well as a mongrel.log file.

    Next, to see if it is something with the mongrel environment itself, stop the application in cPanel > Ruby on Rails area, then restart it in command line:

    Code:
    cd /home/username/rails_apps/appname
    /usr/bin/ruby script/server -p port# -d
    Again, above username is the cPanel username and appname is the Rails application name. Please note that you'd replace port# with the mongrel port number the application would be running on (you might want to check that before stopping it in cPanel > Ruby on Rails area).

    Upon restarting it in command line, check if it still fails at that 10 minute interval.
     
  3. CrunchyToast

    CrunchyToast Active Member

    Joined:
    May 13, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Yakima, WA
    cPanel Access Level:
    DataCenter Provider
    After looking at the logs, I don't see any errors listed or shown. Nothing out of the ordinary.

    Upon running the following, I cannot access the app from the subdomain with the rewrite, nor can I access it via the port assigned to the app.

     
  4. CrunchyToast

    CrunchyToast Active Member

    Joined:
    May 13, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Yakima, WA
    cPanel Access Level:
    DataCenter Provider
    Actually it looks like I just noticed something. I followed the log until it crashed. The first time it crashed I got this:

    The second time I have this:

     
    #4 CrunchyToast, Jan 26, 2012
    Last edited: Jan 26, 2012
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What are lines 342 in /usr/lib/ruby/1.8/cgi.rb file and 107 in /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_view/helpers/tag_helper.rb file?

    A segmentation fault is a relatively serious issue for an application. You are likely going to have to learn how to strace the process to get more details on what is happening immediately before it produces the segmentation fault. We have a video and guide on using strace at the following location:

    Advanced cPanel Troubleshooting with Strace | cPanel Video Site

    If ChiliProject has a forum or a support avenue you can pursue, I would highly suggest contacting them for support.
     
  6. CrunchyToast

    CrunchyToast Active Member

    Joined:
    May 13, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Yakima, WA
    cPanel Access Level:
    DataCenter Provider
    Line 342 in /usr/lib/ruby/1.8/cgi.rb is
    and line 107 in /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.14/lib/action_view/helpers/tag_helper.rb is:
    I've posted on their forum to see if anyone knows of any issue currently.
     
  7. wizhosting

    wizhosting Registered

    Joined:
    Nov 25, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Córdoba, Argentina, Argentina
    Hello, did you fix it ?
     
  8. CrunchyToast

    CrunchyToast Active Member

    Joined:
    May 13, 2011
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Yakima, WA
    cPanel Access Level:
    DataCenter Provider
    This issue is so old it's hard to remember how, but the issue did stop. I think the reason it was happening to begin with is that I tried so many different tutorials on how to get Redmine working on cPanel that I screwed up Rails so bad it wasn't stable. I eventually did a full reinstall of the server and cPanel and followed one tutorial located on the Redmine site that everything worked perfectly afterwards.
     
Loading...

Share This Page