502 Error, Randomly occurs on established service

I found this other thread referencing the “dynamic-paid-error”:

It suggests it is our application that served the error. Digging into our logs, I can see:

  1. Our new service instance was spun up and served its first healthcheck request at 2022-10-28T20:15:32.468842Z. (syslog.appname = web-svrgt)

  2. Render sent the shutdown signal to our old service instance running the Puma web process (were running rails) at 2022-10-28T20:16:37Z. (syslog.appname = web-6d667)

  3. The Date response header here indicates that this request happened at 2022-10-28T20:16:51Z (Fri, 28 Oct 2022 20:16:51 GMT).

  4. The only request logs around the time of the failed browser request on the new server instance were successful healthcheck requests.

Given this, it seems like Render might be continuing to try and serve traffic to the old service instance (web-6d667) after it had given it the shutdown signal. If that is true, it is continuing to do this behavior for 20+ seconds after the old service instance was told to shutdown.

Subjectively, this feels correct based on what I have observed. During the deploy, I was rapidly hitting refresh and saw the old version, then consistent 502 errors, then some 502 errors interspersed with the new version, then finally, the new version was fully live and everything worked great.

Does my conclusion seem right? Let me know if this helps or if there is anything else I can add.