I am seeing this in a heroku worker. The first time the worker does a job, 
it works. The second time, this error is thrown. So the solution is what? 
To add to the worker_on_boot in Puma config and establish a connection?


On Friday, January 19, 2018 at 1:50:52 PM UTC-5, Michael Granger wrote:
>
> On Friday, January 19, 2018 at 10:33:55 AM UTC-8, David Lazar wrote:
>>
>> My latest Apps deployed to Heroku are now experiencing errors I have not 
>> seen before. Specifically, during worker tasks, the connection is 
>> generating an error:
>>
>> ERROR -- : PG::ConnectionBad: PQconsumeInput() SSL error: decryption 
>> failed or bad record mac:
>>
>> The Puma config I use it pretty generic, in that it does not preloadapp! 
>> calls or anything in the worker_on_boot calls. I just setup my initializer 
>> for Sequel as usual and expect web and workers to just work. 
>>
>>
> I don't know what async job software you're using, but it looks like you 
> might be sharing the same PostgreSQL socket between multiple processes. To 
> fix this, you usually need to reconnect to the database inside each new 
> process via an `after_fork`. This StackOverflow question goes into more 
> detail for Heroku+Resque, but it's applicable to most async worker 
> frameworks: 
> https://stackoverflow.com/questions/9961044/postgres-error-on-heroku-with-resque
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to