Topic: Rails_app's seg. fault

Hello,

The ruby on rails website keeps crashing a couple of times per 1 or 2 months. Please help to fix it.

Here is mongrel.log:

Error sending file /home/***ee/etc/rails_apps/***/public/images/products/677/large/4c470f52b0fbd.jpg: Broken pipe
sh: line 1:  5220 Killed                  convert "/tmp/stream20110412-14398-1cwh7sx-0,14398,2[0]" -resize "x120" -crop "100x120+30+0" +repage "/tmp/stream20110412-14398-1cwh7sx-0,14398,2,14398,0" 2> /dev/null
Error sending file /home/***ee/etc/rails_apps/***/public/images/products/637/small/untitled.bmp: Connection reset by peer
Error sending file /home/***ee/etc/rails_apps/***/public/images/products/638/small/HTT-10.jpg: Connection reset by peer
Error sending file /home/***ee/etc/rails_apps/***/public/images/products/629/small/DSC00543.jpg: Connection reset by peer
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/schema_definitions.rb:197: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]

Is it the coding or server side issue ?
Let me know if You need more information about gems etc.


          # Doesn't handle time zones.
          def fast_string_to_time(string)
            if string =~ Format::ISO_DATETIME   // line 197
              microsec = ($7.to_f * 1_000_000).to_i
              new_time $1.to_i, $2.to_i, $3.to_i, $4.to_i, $5.to_i, $6.to_i, microsec
            end
          end

Any help will be highly appreciated!

Re: Rails_app's seg. fault

Your error is totally unrelated to the code you have posted

you have a broken pipe error whilst sending an image to the server and all subsequent sends are failing as a result of connection resets.
Looks to me like the server is struggling to handle the load occasionally. Perhaps your host could help you further.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Rails_app's seg. fault

Thank You for the reply.

I'm hoster of the server and actually don't know where to dig from, could You advise ?

Server load is generally 10 - 30 %.

Re: Rails_app's seg. fault

Hmmm! Possibly a badly formatted image?
Sorry I'm unable to help much more than that

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)