Searching for gitlab causes HTTP 500 due to plugins

Could you help me to avoid this issue?

2.4.0.beta4 (8adec48b33)

Unicorn and production logs

E, [2019-09-27T09:29:44.306022 #226] ERROR -- : app error: undefined method `each' for "Rate Limited":String (NoMethodError)
E, [2019-09-27T09:29:44.306327 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/body_proxy.rb:36:in `each'
E, [2019-09-27T09:29:44.306480 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_response.rb:58:in `http_response_write'
E, [2019-09-27T09:29:44.306628 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:616:in `process_client'
E, [2019-09-27T09:29:44.306726 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:700:in `worker_loop'
E, [2019-09-27T09:29:44.306802 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
E, [2019-09-27T09:29:44.306833 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:144:in `start'
E, [2019-09-27T09:29:44.306858 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.1/bin/unicorn:128:in `<top (required)>'
E, [2019-09-27T09:29:44.306885 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
E, [2019-09-27T09:29:44.306909 #226] ERROR -- : /var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<main>'
Started GET "/search?q=gitlab" for 127.0.0.1 at 2019-09-27 09:38:13 +0000
Processing by SearchController#show as JSON
  Parameters: {"q"=>"gitlab"}
Completed 500 Internal Server Error in 129ms (ActiveRecord: 0.0ms | Allocations: 66115)
StandardError (Attempting to access a non preloaded custom field, this is disallowed to prevent N+1 queries.)
/var/www/discourse/app/models/concerns/has_custom_fields.rb:164:in `[]'

Looks like it is plugin related, try uninstalling all unofficial plugins

2 Likes

So is it not enough to enter safe mode, right?

Could disabling the plugin be enough?

Unlikely enough but worth a try

Is there a quick-swtich in the config to turn of all unofficial plugin in app.yml?

Nope, just comment each one out and rebuild, then enable half and so on till you find the culprit

That means a lot of downtime :disappointed:

To minimize down time you can either spin up another server to do the debugging or see How to move from standalone container to separate web and data containers.

1 Like