Mastodonのストリーミングが5分ごとくらいにSocketClosedUnexpectedlyError出してるのHeroku Redisの接続のアイドルタイムアウトが5分だからだった。なるほどなるほど。
https://devcenter.heroku.com/articles/heroku-redis#timeout
ERR! Redis Client Error!
Error: Socket closed unexpectedly
at Socket.<anonymous> (/app/node_modules/@node-redis/client/dist/lib/client/socket.js:182:118)
at Object.onceWrapper (node:events:510:26)
at Socket.emit (node:events:390:28)
at TCP.<anonymous> (node:net:687:12)
SocketClosedUnexpectedlyError: Socket closed unexpectedly
at Socket.<anonymous> (/app/node_modules/@node-redis/client/dist/lib/client/socket.js:182:118)
at Object.onceWrapper (node:events:510:26)
at Socket.emit (node:events:390:28)
at TCP.<anonymous> (node:net:687:12)
@zundan Is this new?
@Gargron Not really. I have been seeing the errors for a couple of months, since I believe the redis package was upgraded for streaming. Today, I found that it is Heroku Redis disconnecting idle connections and triggers streaming to emit the errors. I guess the older versions of redis package just didn't record the errors for network disconnects.