Open geoffrich opened 1 year ago
Another (potentially related) error:
Jan 16, 11:09:19 AM: 641700be ERROR Refresh error TypeError: fetch failed
at fetch (file:///var/task/.netlify/shims.js:20554:14) {
cause: SocketError: other side closed
at TLSSocket.onSocketEnd (file:///var/task/.netlify/shims.js:8489:24)
at TLSSocket.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'UND_ERR_SOCKET',
socket: {
localAddress: '169.254.76.1',
localPort: 34842,
remoteAddress: '34.148.19.16',
remotePort: 443,
remoteFamily: 'IPv4',
timeout: undefined,
bytesWritten: 3556,
bytesRead: 0
}
}
}
From nodejs/undici issue 1531, it seems like it could be an ipv6 config issue? Maybe something wrong with the marvel.geoffrich.net domain?
Clicked the big "enable ipv6" on Netlify DNS, we'll see if that fixes it (probably need to wait for changes to propagate)
The request to refresh the cache (implemented in #10) seems to regularly fail. Not sure if bumping undici or trying node 18 would fix it. There may be some weirdness going on since we're requesting back into the site.
Could also see if waiting some time (e.g. 100ms) for the request to be dispatched would help.
At time of writing, it still succeeds enough - recent comics are shown on the site.
The code is here:
https://github.com/geoffrich/marvel-by-year/blob/2309f0ad4a080ee6f1f05e86163358de5c2b2c46/src/lib/api.ts#L44-L52