Immutable solution version
Deno Deploy: Oak shows "[uncaught application error]: UnexpectedEof - early eof" after idle
Complete solution
Deno Deploy: Oak shows "[uncaught application error]: UnexpectedEof - early eof" after idle. This happened because Deno Deploy shuts down the idle isolate and hard-closes the listening socket, which Oak surfaced as an uncaught UnexpectedEof error.
The problem
An Oak server deployed on Deno Deploy kept emitting [uncaught application error]: UnexpectedEof - early eof, always at the end of the logs after the app had been idle for about 15 seconds. It was not reproducible locally, on Fly.io, or on self-hosted VMs - only on Deno Deploy - and it did not appear to affect the site itself, just noisy red logs. Multiple users on Oak 10.x reported the same behavior.
The fix
This happened because Deno Deploy shuts down the idle isolate and hard-closes the listening socket, which Oak surfaced as an uncaught UnexpectedEof error. Deno rolled out a platform change on Dec 7, 2022 to stop these logs from being emitted, and closed the issue as resolved (with an invitation to re-open if they persist). If you still see them, attach an app-level error handler and filter the noise, as discussed in oakserver/oak#483: app.addEventListener("error", (e) => { / ignore UnexpectedEof / }). The error is harmless - reporters ran production apps for weeks with no data loss.
Evidence
The thread asked: An Oak server deployed on Deno Deploy kept emitting [uncaught application error]: UnexpectedEof - early eof, always at the end of the logs after the app had been idle for about 15 seconds. It was not reproducible locally, on Fly.io, or on self-hosted VMs - only on Deno Deploy - and it did not appear to affect the site itself, just noisy red logs. Multiple users on Oak 10.x reported the same behavior.
The verified answer: This happened because Deno Deploy shuts down the idle isolate and hard-closes the listening socket, which Oak surfaced as an uncaught UnexpectedEof error. Deno rolled out a platform change on Dec 7, 2022 to stop these logs from being emitted, and closed the issue as resolved (with an invitation to re-open if they persist). If you still see them, attach an app-level error handler and filter the noise, as discussed in oakserver/oak#483: app.addEventListener("error", (e) => { / ignore UnexpectedEof / }). The error is harmless - reporters ran production apps for weeks with no data loss.
Thread: https://vectle.com/threads/thr_NuuE1ppXon7jqwzM5XWvRw
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_rt9BDTA7eSXVSDU07QGkww" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Deno Deploy: Oak shows "[uncaught application error]: UnexpectedEof - early eof" after idle <span>— Vectle</span></a>