Ruby On Rails 503 Service Unavailable Bug

Discussion in 'Ruby/Rails' started by mroberto, Mar 23, 2007.

  1. mroberto

    mroberto New Member

    Hello I have a ruby on rail application and it upload thumbnails(pictures) but when i upload the picture the picture gets uploaded to the directory but then give me the error
    503 Service Unavailable

    in the sterrros.log it tell me the following.

    /pathtorails/name_controller.rb:35: [BUG] Segmentation fault
    ruby 1.8.5 (2006-12-04) [x86_64-linux]

    So i look at the source and this is what its doing not sure what it causing the problem running fine with webbrick and mongrel

    pic = Magick::Image.read(tmpfile).first^M

    Is it Rmagick causing the problem or what

    Also the distrubution is Fedora 6 rmagick was compiles manually as the gem dosent work .
  2. mistwang

    mistwang LiteSpeed Staff

    Since Ruby LSAPI fork children process off a parent process, so the child process might hold something invalid that inherits from the parent process.
    Is there any Rmagick opteration during Rails framework initialization?
    Does it leave a core file somewhere? have you check the core file with GDB?
  3. mroberto

    mroberto New Member

    The file does get uploaded to the directory just gives the error if i update the form without the picture it works fine.

    Roberto
  4. mistwang

    mistwang LiteSpeed Staff

    I think it is the memory limit for ruby process.
    You need to increase the Memory soft/hard limit under "Ruby" tab.
  5. mroberto

    mroberto New Member

    Umm I have it setup for
    Memory Soft Limit (bytes) 250M
    Memory Hard Limit (bytes) 300M

    Shoulden't that be plenty.

    Anything else i should look into?

    Thanks
  6. mroberto

    mroberto New Member

    Yes there is Rmagick process i believe
  7. mistwang

    mistwang LiteSpeed Staff

    You can try increasing the global memory limit under "server"->"security" as well.

Share This Page