{"record":{"id":"501b37808bd598ed","repo":"abhigyanpatwari/GitNexus","slug":"the-ladybugdb-buffer-pool-poollabel-was-exhau","errorCode":null,"errorMessage":"The LadybugDB buffer pool (${poolLabel}) was exhausted during the bulk COPY.${pageNote} Set GITNEXUS_LBUG_BUFFER_POOL_SIZE=<bytes> to raise it (e.g. ${4 * 1024 * 1024 * 1024} for 4 GiB); 0 restores LadybugDB's native 80%-of-RAM default.","messagePattern":"The LadybugDB buffer pool \\((.+?)\\) was exhausted during the bulk COPY\\.(.+?) Set GITNEXUS_LBUG_BUFFER_POOL_SIZE=<bytes> to raise it \\(e\\.g\\. (.+?) for 4 GiB\\); 0 restores LadybugDB's native 80%-of-RAM default\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gitnexus/src/core/lbug/lbug-adapter.ts","lineNumber":1293,"sourceCode":"\n      // Use the captured `writeConn` (not the module-level `conn`) for the rel\n      // COPY, matching the node COPY above — one captured reference for the whole\n      // bulk load (#2264 review P3). Same object during analyze (`conn` is only\n      // reassigned at open/close under the session lock, never mid-load), so the\n      // queryAndDrain `targetConn === conn` lock gate still engages.\n      await copyCsvWithRetry(writeConn, copyQuery, (retryErr) => {\n        const retryMsg = retryErr instanceof Error ? retryErr.message : String(retryErr);\n        warnings.push(`${fromLabel}->${toLabel} (${rows} edges): ${retryMsg.slice(0, 80)}`);\n        // One remedy per bulk load, not per pair (#2631): pool exhaustion\n        // repeats for every remaining pair once it starts. logger.warn, not\n        // just warnings.push — the returned warnings array has no consumer at\n        // any call site, so a push alone would leave the remedy invisible\n        // while the row-by-row fallback quietly degrades the load.\n        const remedy = poolRemedyIssued ? undefined : bufferPoolExhaustionRemedy(retryMsg);\n        if (remedy) {\n          poolRemedyIssued = true;\n          warnings.push(remedy);\n          logger.warn(remedy);\n        }\n        failedPairEdges += rows;\n        failedPairCsvPaths.add(pairCsvPath);\n      });\n      // Only delete if not in failedPairCsvPaths (needed for fallback)\n      if (!failedPairCsvPaths.has(pairCsvPath)) {\n        try {\n          await fs.unlink(pairCsvPath);\n        } catch {}\n      }\n    }\n    tCopyRels = mark();\n\n    if (failedPairCsvPaths.size > 0) {\n      log(`Inserting ${failedPairEdges} edges individually (missing schema pairs)`);\n      // Read failed pair files and merge for fallback inserts\n      const allLines: string[] = [relHeader];\n      for (const failedPath of failedPairCsvPaths) {","sourceCodeStart":1275,"sourceCodeEnd":1311,"githubUrl":"https://github.com/abhigyanpatwari/GitNexus/blob/0d1aed942f0e8b5d3bac27519fff441aceea722d/gitnexus/src/core/lbug/lbug-adapter.ts#L1275-L1311","documentation":"Error \"The LadybugDB buffer pool (${poolLabel}) was exhausted during the bulk COPY.${pageNote} Set GITNEXUS_LBUG_BUFFER_POOL_SIZE=<bytes> to raise it (e.g. ${4 * 1024 * 1024 * 1024} for 4 GiB); 0 restores LadybugDB's native 80%-of-RAM default.\" thrown in abhigyanpatwari/GitNexus.","triggerScenarios":"Thrown at gitnexus/src/core/lbug/lbug-adapter.ts:1306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0d1aed942f0e8b5d3bac27519fff441aceea722d","analyzedAt":"2026-08-20T23:29:22.980Z","contentChangedAt":"2026-08-20T23:29:22.980Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}