The Australian production server was experiencing timeouts for all requests to any admin page, beginning sometime around 2015-09-10 00:00 UTC. Nothing we did seemed to fix the issue, whether reverting the codebase or restarting the server.
Problem
@RohanM narrowed the problem down to the requests that are made to a Spree web service which communicates information like security notices and notifications of urgent updates. These requests appear to have been timing out, which in turn was causing our server to kill the original requests from the client.
Resolution
By turning off requests to the Spree web service, we managed to get our system functioning as normal. We are still investigating whether this service is temporarily or permanently offline. Requests to Spree can be turned off by setting Spree::Config[:check_for_spree_alerts] = false in the rails console, and then restarting your server. Apparently there is some magic which recognises assignment of spree config variables and writes them directly to the database.
Restart server in other terminal: bundle exec rails server [-b 0.0.0.0]
I’m getting same 500 error as shown on other thread:
(0.5ms) SELECT COUNT(*) FROM "spree_states" WHERE "spree_states"."country_id" = 49 AND (name = 'Alabama' OR abbr = 'Alabama')
Spree::State Load (0.4ms) SELECT "spree_states".* FROM "spree_states" WHERE "spree_states"."country_id" = 49 AND (name = 'Alabama' OR abbr = 'Alabama') ORDER BY name ASC LIMIT 1
(0.2ms) SELECT COUNT(*) FROM "enterprises" WHERE "enterprises"."name" = ''
CACHE (0.0ms) SELECT "spree_countries".* FROM "spree_countries" WHERE "spree_countries"."id" = 49 LIMIT 1
CACHE (0.0ms) SELECT COUNT(*) FROM "spree_states" WHERE "spree_states"."country_id" = 49 AND (name = 'Alabama' OR abbr = 'Alabama')
CACHE (0.0ms) SELECT "spree_states".* FROM "spree_states" WHERE "spree_states"."country_id" = 49 AND (name = 'Alabama' OR abbr = 'Alabama') ORDER BY name ASC LIMIT 1
Enterprise Exists (0.3ms) SELECT 1 AS one FROM "enterprises" WHERE "enterprises"."permalink" = 'my-enterprise' LIMIT 1
(0.1ms) ROLLBACK
Completed 500 Internal Server Error in 213.4ms
** [Bugsnag] No API key configured, couldn't notify
I know we are looking to configure Bugsnag to track down error source.