fix: scale web-probe tail scan budget (#786)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-24 06:22:31 +08:00
committed by GitHub
parent cf5c782997
commit 02f78a89c7
@@ -2480,7 +2480,7 @@ async function readTailLines(file, limit) {
const info = await stat(file);
if (!info.size || limit <= 0) return [];
const chunkSize = 64 * 1024;
const maxBytes = 32 * 1024 * 1024;
const maxBytes = Math.max(32 * 1024 * 1024, Math.min(256 * 1024 * 1024, limit * 512 * 1024));
const chunks = [];
let position = info.size;
let readBytes = 0;