I made that small change.. thanks Jeremy.

I suspect this is a Resque issue then... the first hit works... worker.1 
works.. Sequel is good to go. 

First job... works fine

2018-01-19T20:08:10.703880+00:00 app[worker.1]: I, 
[2018-01-19T20:08:10.703756 #7]  INFO -- : [ActiveJob] [NewOrderJob] 
[94a6c389-2017-4f54-9831-4f6f9e193cc1] Performed NewOrderJob (Job ID: 
94a6c389-2017-4f54-9831-4f6f9e193cc1) from Resque(default) in 1087.76ms

Second job comes into to worker... 

D, [2018-01-19T20:08:51.080544 #12] DEBUG -- : [ActiveJob] [NewOrderJob] 
[5881426e-acd9-4af3-b5a1-b11d886d2638]   Sequel::Postgres::Database 
(1.9ms)  SELECT * FROM "shops" WHERE ("shopify_domain" = 
'swift-braun3430.myshopify.com') LIMIT 1
2018-01-19T20:08:51.083677+00:00 app[worker.1]: E, 
[2018-01-19T20:08:51.083594 #12] ERROR -- : PG::ConnectionBad: 
PQconsumeInput() SSL error: decryption failed or bad record mac: SELECT * 
FROM "shops" WHERE ("shopify_domain" = 'swift-braun3430.myshopify.com') 
LIMIT 1
2018-01-19T20:08:51.084323+00:00 app[worker.1]: E, 
[2018-01-19T20:08:51.084206 #12] ERROR -- : [ActiveJob] [NewOrderJob] 
[5881426e-acd9-4af3-b5a1-b11d886d2638] Error performing NewOrderJob (Job 
ID: 5881426e-acd9-4af3-b5a1-b11d886d2638) from Resque(default) in 33.67ms: 
Sequel::DatabaseDisconnectError (PG::ConnectionBad: PQconsumeInput() SSL 
error: decryption failed or bad record mac
2018-01-19T20:08:51.084326+00:00 app[worker.1]: ):

So somehow when Reqsue brings a job to life, the DB connection is toast... 




On Friday, January 19, 2018 at 2:33:26 PM UTC-5, David Lazar wrote:
>
>
> Thanks for the help!
>
> I am so frustrated by this... the terminology is what is killing me. I 
> have a free worker and a free Dyno for this test... and all the code works, 
> until I send a second request to the worker. I suspect it is all me.. 
>
> I created a gist of the config files I use.. not sure that is too helpful, 
> but anyway, this setup of Puma, Sequel at heroku with a worker, is 
> troubling me... 
>
> https://gist.github.com/resistorsoftware/f77b15e66c9362b8c9b7f281bccc1851
>
>
> On Friday, January 19, 2018 at 2:26:59 PM UTC-5, Jeremy Evans 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. 
>>>
>>> Any tips on what might be causing this at Heroku?
>>>
>>
>> It does sound like an error you would get if the same connection was used 
>> by multiple processes or threads simultaneously. If you aren't preloading 
>> or forcing use of the single threaded connection pool, I'm not sure what 
>> would cause it.  If you can produce a minimal self-contained example 
>> showing the problem, I can look into it.
>>
>> Thanks,
>> Jeremy
>>
>

-- 
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