�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:34.799792226Z 172.18.0.6 - - [28/Dec/2017:13:14:34 UTC] "GET /manuals/e151d4e0-37af-4222-a884-2cba46e78a1e HTTP/1.1" 200 11526
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:34.817106101Z http://manuals-publisher.dev.gov.uk/manuals/new -> /manuals/e151d4e0-37af-4222-a884-2cba46e78a1e
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:34.817685298Z 172.18.0.6 - - [28/Dec/2017:13:14:34 UTC] "GET /manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d HTTP/1.1" 200 11440
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:34.817723492Z http://manuals-publisher.dev.gov.uk/manuals/new -> /manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:35.348133557Z 172.18.0.6 - - [28/Dec/2017:13:14:34 UTC] "GET /manuals/e151d4e0-37af-4222-a884-2cba46e78a1e/sections/new HTTP/1.1" 200 18658
�[31;1mnginx-proxy_1 |�[0m 2017-12-28T13:14:35.348278646Z �[0;33;1mnginx.1 | �[0mmanuals-publisher.dev.gov.uk 172.18.0.40 - - [28/Dec/2017:13:14:35 +0000] "GET /manuals/e151d4e0-37af-4222-a884-2cba46e78a1e/sections/new HTTP/1.1" 200 18658 "http://manuals-publisher.dev.gov.uk/manuals/e151d4e0-37af-4222-a884-2cba46e78a1e" "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1"
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:35.348719154Z http://manuals-publisher.dev.gov.uk/manuals/e151d4e0-37af-4222-a884-2cba46e78a1e -> /manuals/e151d4e0-37af-4222-a884-2cba46e78a1e/sections/new
�[31;1mnginx-proxy_1 |�[0m 2017-12-28T13:14:35.733444263Z �[0;33;1mnginx.1 | �[0mmanuals-publisher.dev.gov.uk 172.18.0.40 - - [28/Dec/2017:13:14:35 +0000] "GET /manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d/sections/new HTTP/1.1" 500 156009 "http://manuals-publisher.dev.gov.uk/manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d" "Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1"
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:35.734791046Z 172.18.0.6 - - [28/Dec/2017:13:14:34 UTC] "GET /manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d/sections/new HTTP/1.1" 500 156009
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:35.734842476Z http://manuals-publisher.dev.gov.uk/manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d -> /manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d/sections/new
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325900991Z Started GET "/manuals/e151d4e0-37af-4222-a884-2cba46e78a1e/sections/new" for 172.18.0.6 at 2017-12-28 13:14:34 +0000
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325908650Z Processing by SectionsController#new as HTML
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325915668Z Parameters: {"manual_id"=>"e151d4e0-37af-4222-a884-2cba46e78a1e"}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325924545Z DEPRECATION WARNING: require_signin_permission! is deprecated and will be removed in a future version. The signon application checks for signin permission during oauth and it is no longer optional. (called from block in make_lambda at /usr/local/bundle/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325933766Z Authenticating with mock_gds_sso strategy
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325940390Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manuals_publisher_users", "filter"=>{}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325950212Z Started GET "/manuals/6c19ce85-893d-4f86-a79d-cf92d3e7f95d/sections/new" for 172.18.0.6 at 2017-12-28 13:14:34 +0000
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325957590Z Processing by SectionsController#new as HTML
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325964215Z Parameters: {"manual_id"=>"6c19ce85-893d-4f86-a79d-cf92d3e7f95d"}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325974193Z DEPRECATION WARNING: require_signin_permission! is deprecated and will be removed in a future version. The signon application checks for signin permission during oauth and it is no longer optional. (called from block in make_lambda at /usr/local/bundle/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325982743Z Authenticating with mock_gds_sso strategy
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.325996296Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manuals_publisher_users", "filter"=>{}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326005880Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.010720101000000001s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326012648Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.003625256s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326028360Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_records", "filter"=>{"manual_id"=>"e151d4e0-37af-4222-a884-2cba46e78a1e"}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326038955Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_records", "filter"=>{"manual_id"=>"6c19ce85-893d-4f86-a79d-cf92d3e7f95d"}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326048623Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.001196605s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326055551Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.00173128s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326062109Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba4')}, "limit"=>-1, "sort"=>{"version_number"=>-1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326071927Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba3')}, "limit"=>-1, "sort"=>{"version_number"=>-1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326081442Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.0010289309999999999s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326088210Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba3')}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326096419Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.002680808s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326103047Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba4')}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326111283Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.001585376s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326118992Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.0022324759999999997s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326126214Z Rendering sections/new.html.erb within layouts/application
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326132925Z Rendering sections/new.html.erb within layouts/application
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326139810Z Rendered shared/_form_errors.html.erb (0.8ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326146414Z Rendered shared/_form_errors.html.erb (0.1ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326153142Z Rendered shared/_govspeak_help.html.erb (1.9ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326159670Z Rendered shared/_govspeak_help.html.erb (0.1ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326166197Z Rendered sections/_form.html.erb (35.6ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326172702Z Rendered sections/_form.html.erb (29.4ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326179286Z Rendered sections/new.html.erb within layouts/application (39.7ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326185864Z Rendered sections/new.html.erb within layouts/application (37.8ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326192398Z Completed 500 Internal Server Error in 196ms
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326198825Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326209908Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326216640Z Rendered shared/_breadcrumbs.html.erb (0.9ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326223417Z Rendering /usr/local/bundle/gems/govuk_admin_template-6.4.0views/layouts/govuk_admin_template.html.erb
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326230316Z Sending event d633f16b26e14241941cbef858ed7e02 to Sentry
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326236887Z Rendered /usr/local/bundle/gems/govuk_admin_template-6.4.0views/layouts/govuk_admin_template.html.erb (97.7ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326243725Z Completed 200 OK in 420ms (Views: 347.1ms)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326250225Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326256430Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326262653Z Raven HTTP Transport connecting to http://error-handler.dev.gov.uk
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326269167Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326275455Z ActionView::Template::Error (can't add a new key into hash during iteration):
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326282230Z 1: <% content_for :head do %>
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326289214Z 2: <%= stylesheet_link_tag "application", :media => "all" %>
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326297100Z 3: <%= javascript_include_tag 'application' %>
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326304178Z 4: <%= csrf_meta_tags %>
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326310933Z 5: <% end %>
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326317754Z
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326324138Z app/views/layouts/application.html.erb:2:in `block in _app_views_layouts_application_html_erb___3810703486753751096_70281889035320'
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326331400Z app/views/layouts/application.html.erb:1:in `_app_views_layouts_application_html_erb___3810703486753751096_70281889035320'
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326338609Z app/controllers/sections_controller.rb:25:in `new'
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326345493Z Started POST "/manuals/e151d4e0-37af-4222-a884-2cba46e78a1e/sections" for 172.18.0.6 at 2017-12-28 13:14:35 +0000
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326360471Z Processing by SectionsController#create as HTML
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326369288Z Parameters: {"utf8"=>"✓", "authenticity_token"=>"pi52WsmYDCsC7tIXMZ4KVn/iMvyBwW98qLiaLJ44O7tRXNhGquG5V9DrL0nJFVDnZior6Vwiv/9lfqnSOY9Osw==", "section"=>{"title"=>"The House of Mirth 1514466874", "summary"=>"Labore consectetur non veniam sed quaerat vero.", "body"=>"Et illum quibusdam. Dolores et et odio nesciunt. Nihil voluptatem necessitatibus non deleniti commodi.", "change_note"=>"New section added."}, "draft"=>"", "manual_id"=>"e151d4e0-37af-4222-a884-2cba46e78a1e"}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326384836Z DEPRECATION WARNING: require_signin_permission! is deprecated and will be removed in a future version. The signon application checks for signin permission during oauth and it is no longer optional. (called from block in make_lambda at /usr/local/bundle/gems/activesupport-5.1.4/lib/active_support/callbacks.rb:413)
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326392976Z Authenticating with mock_gds_sso strategy
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326399683Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manuals_publisher_users", "filter"=>{}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326416013Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.004503717s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326423391Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_records", "filter"=>{"manual_id"=>"e151d4e0-37af-4222-a884-2cba46e78a1e"}, "limit"=>-1, "sort"=>{"_id"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326432765Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.002151824s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326439473Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba3')}, "limit"=>-1, "sort"=>{"version_number"=>-1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326449181Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.001500657s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326455982Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_record_editions", "filter"=>{"manual_record_id"=>BSON::ObjectId('5a44ee3ae59d4d0009347ba3')}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326464219Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.001163941s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326470917Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"publication_logs", "filter"=>{"slug"=>/^guidance\/the-mirror-crackd-from-side-to-side-1514466851(\/|$)/}, "sort"=>{"created_at"=>1}}
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326480541Z MONGODB | mongo:27017 | manuals-publisher.find | SUCCEEDED | 0.001081149s
�[32mmanuals-publisher_1 |�[0m 2017-12-28T13:14:36.326489108Z MONGODB | mongo:27017 | manuals-publisher.find | STARTED | {"find"=>"manual_records", "filter"=>{"manual_id"=>"e151d4e0-37af-4222-a884-2cba46e78a1e"}, "limit"=>-1, "sort"=>{"_id"=>1}}
I wonder if this would be resolved by switching to running the app with unicorn server instead as it seems to be a concurrency related issue. Seems kinda strange though since it's quite deep in Rails and I think WEBRick runs Rails as threads.