diff --git a/scripts/src/hwlab-node-web-observe-runner-source.ts b/scripts/src/hwlab-node-web-observe-runner-source.ts index 89f2c638..3d6f03d0 100644 --- a/scripts/src/hwlab-node-web-observe-runner-source.ts +++ b/scripts/src/hwlab-node-web-observe-runner-source.ts @@ -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;