Bug #1895
closedWeird random 500s when surfing the UI
Description
Hi,
Sometimes we're seeing weird errors when browsing the UI. Unfortunately, we can't tell yet how to reproduce them as we haven't seen any pattern so far :(
Started GET "/hosts?utf8=%E2%9C%93&search=ndnd" for A.B.C.D at Mon Oct 08 09:04:39 +0200 2012 Processing by HostsController#index as HTML Parameters: {"utf8"=>"¿", "search"=>"ndnd"} Operation FAILED: undefined method `minutes' for true:TrueClass Read fragment views/tabs_and_title_records-54 (0.5ms) Rendered home/_topbar.rhtml (3.0ms) Rendered common/500.rhtml within layouts/application (22.5ms) Completed 500 Internal Server Error in 40ms (Views: 25.5ms | ActiveRecord: 5.9ms)
Started GET "/" for A.B.C.D at Thu Oct 11 16:08:05 +0200 2012 Processing by DashboardController#index as HTML Operation FAILED: undefined method `+' for true:TrueClass Read fragment views/tabs_and_title_records-54 (0.3ms) Rendered home/_topbar.rhtml (1.1ms) Rendered common/_searchbar.erb (10.2ms) Rendered common/500.rhtml within layouts/application (24.0ms) Completed 500 Internal Server Error in 47ms (Views: 28.9ms | ActiveRecord: 14.1ms)
Started GET "/hosts?utf8=%E2%9C%93&search=hostgroup+%3D+public+and+name+%7E+btb+and+not+has+last_report" for A.B.C.D at Thu Oct 11 15:45:01 +0200 2012 Processing by HostsController#index as HTML Parameters: {"search"=>"hostgroup = public and name ~ btb and not has last_report", "utf8"=>"¿"} Operation FAILED: undefined method `to_i' for true:TrueClass Read fragment views/tabs_and_title_records-54 (0.7ms) Rendered home/_topbar.rhtml (1.8ms) Rendered common/_searchbar.erb (19.4ms) Rendered common/500.rhtml within layouts/application (45.8ms) Completed 500 Internal Server Error in 65ms (Views: 45.8ms | ActiveRecord: 10.7ms)
Foreman version: foreman-1.0.1-2.el6
We're using memcached as cache backend to store settings.
Attached is a full trace of an error similar to the second one. Ping me if you need any more information. Thanks!
Files
Updated by Ohad Levy over 12 years ago
this seems cache related problems, does it happen only with memcache?
Updated by Daniel Lobato Garcia over 12 years ago
It might have to do with mod_passenger Spawning policies. I am trying setting it to conservative and seeing how it plays around. If in a few days I don't get any 500 I assume that was the 'error'.
Updated by Daniel Lobato Garcia over 12 years ago
More info on why this is happening
tl;dr mod_passenger and memcached sharing the same connection
Updated by Daniel Lobato Garcia over 12 years ago
Looks like the issue was finally 100% solved by replacing the old memcached_client gem by an up-to-date version of dalli: https://github.com/mperham/dalli
Updated by Ohad Levy over 12 years ago
- Status changed from New to Closed
Great! would you mind adding a wiki page on how to setup foreman on memcache?