Heroku support says this has to do with their version of libssl on shared databases, but we've encountered it on a project that's on a dedicated database, too.
Basically this error happens every so often (closer to just after a deploy) on every project we've moved to the new Cedar stack with Unicorn configured to 3 workers:
Error Message:
ActiveRecord::StatementInvalid: PGError: SSL SYSCALL error: EOF detected : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.at
Where:
some_controller#index
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.11/lib/active_record/connection_adapters/postgresql_adapter.rb, line 505
No answers from heroku yet besides maybe wait who knows how long for us to upgrade our shared database servers* and I haven't found anything on google.
They also suggested it has to do with unicorn's workers overlapping and that we should switch to Thin but the performance gain is well worth the occasional error(I think!). I'm hoping there's a way to configure Unicorn to prevent the overlap.
Has anyone encountered this, and if so, what have you done to resolve it? Thanks!
*not their actual words, just how I felt after their response.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…