internetee / registry

TLD Management Software
Other
46 stars 19 forks source link

invalid encoding name: unicode #1049

Open vohmar opened 5 years ago

vohmar commented 5 years ago

Every time deploy is done this error is caught by errbit

invalid encoding name: unicode

https://errbit.internet.ee/apps/5bcf2b35d9d1af5a21961be2/problems/5c051556d9d1af253512a4ad

Backtrace
--
/home/registry/registry/shared/bundle/ruby/2.4.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:671 → set_client_encoding /home/registry/registry/shared/bundle/ruby/2.4.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:671 → configure_connection /home/registry/registry/shared/bundle/ruby/2.4.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/postgresql_adapter.rb:277 → reconnect! /home/registry/registry/shared/bundle/ruby/2.4.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:340 → verify! /home/registry/registry/shared/bundle/ruby/2.4.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/abstract/connection_pool.rb:456 → block in checkout_and_verify
maciej-szlosarczyk commented 5 years ago

I made a comment on the Errbit issue earlier. Root cause is the fact that the connection is dropped, and the error message is misleading.

https://bitbucket.org/ged/ruby-pg/issues/267/misleading-error-invalid-encoding-name

Fixed in later version of postgres adapter, which we cannot use yet:

https://bitbucket.org/ged/ruby-pg/commits/a7f98864a7d6


I am not certain if mina should drop a connection like that, and this is probably the fix.

artur-intech commented 5 years ago

Maybe it's also worth updating mina first...

teadur commented 5 years ago

Updating mina means rewriting the config for it, so its not trival, but doable if we don't have any other option.

vohmar commented 5 years ago

pushing this way back in the dev pipeline then