Skip to content


Rails sometimes does not render templates on Ruby-1.9.3-p362 #8648

sekrett opened this Issue · 7 comments

3 participants


I have this problem on Ruby 1.9.3-p362, but no problem on 1.9.3-p327. Running on FreeBSD 9.1-RELEASE, RVM, Rails 3.2.9. Sometimes the page does not render and I get a 504 nginx bad gateway error.

This is the log when the page is opened correctly:

Started GET "/admin/sms_sendings" for at 2012-12-28 00:16:11 +0400
Processing by Admin::SmsSendingsController#index as HTML
  Rendered partials/_per_page.html.haml (1.2ms)
  Rendered admin/sms_sendings/_sms_sendings.html.haml (915.3ms)
  Rendered admin/sms_sendings/index.html.haml within layouts/admin (1094.0ms)
Completed 200 OK in 1385ms (Views: 963.9ms | ActiveRecord: 155.5ms)

And I see this when I get a 504 error:

Started GET "/admin/sms_sendings" for at 2012-12-28 00:16:15 +0400
Processing by Admin::SmsSendingsController#index as HTML

This error happens only on pages which take more time to render, maybe they do more sql queries, about 1200ms. When the page renders, I see a little delay, but when I get the error, it occurs immediately, like it did not try to render at all.

Ruby on Rails member

Sounds like a gateway timeout:

If this fixes the problem please close the ticket or if you think that there's a bug in Rails can you please supply some more information like a simple application that reproduces the problem or a simple list of steps to reproduce the problem.


No, it does not sound like a timeout. As I said in case of error the respond comes immediately. Maybe it was a 502 bad gateway error, not 504 gateway timeout, I don't remember exactly. One error is when nginx can't wait anymore, another is when the client stopped, it is different. For sure I can say the Rails application immediately refuses to render. As soon the error happens just after I click, it is not a timeout issue.

I don't know if it is a Ruby or a Rails bug, or some plugin bug and also do not know why it happens. I'll try to do a small app which reproduces the error. It will be difficult.


Your method that raise this issue, send sms by sms provider ?


No, here it does not do any external connection, it just generates a table.

Ruby on Rails member

@sekrett there are some reports of segfaults with p362 - can you try a previous version to see if that fixes the problem as well as checking the system logs for any crash reports. The log output in your original response is indicative of a crash and you say that the error page appears quickly so it may be the cause.

A coupe of references about the crashes:


Previous Ruby p327 works fine, I told that. Is it possible that after a crash the unicorn process still exist and continue to answer, sometimes fine and sometimes wrong? Just curious.

Ruby on Rails member

From what I've read the segfaults in p362 can be intermittent so that's why you're seeing it work sometimes. I'm closing this for now but if you still seeing problems when a new version of ruby 1.9.3 is released then I'll take another look.

@pixeltrix pixeltrix closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.