{"record":{"id":"8335af3a8bbda3c7","repo":"vercel/next.js","slug":"creating-filter-with-error-rate-less-than-0-1-0","errorCode":null,"errorMessage":"Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate ${this.errorRate} resulted in size ${filterData.length} bytes, ${gzipSize} bytes (gzip)","messagePattern":"Creating filter with error rate less than 0\\.1% \\(0\\.001\\) can increase the size dramatically proceed with caution\\. Received error rate (.+?) resulted in size (.+?) bytes, (.+?) bytes \\(gzip\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/next/src/shared/lib/bloom-filter.ts","lineNumber":59,"sourceCode":"\n  export() {\n    const data = {\n      numItems: this.numItems,\n      errorRate: this.errorRate,\n      numBits: this.numBits,\n      numHashes: this.numHashes,\n      bitArray: this.bitArray,\n    }\n\n    if (process.env.NEXT_RUNTIME === 'nodejs') {\n      if (this.errorRate < DEFAULT_ERROR_RATE) {\n        const filterData = JSON.stringify(data)\n        const gzipSize = (\n          require('next/dist/compiled/gzip-size') as typeof import('next/dist/compiled/gzip-size')\n        ).sync(filterData)\n\n        if (gzipSize > 1024) {\n          console.warn(\n            `Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate ${this.errorRate} resulted in size ${filterData.length} bytes, ${gzipSize} bytes (gzip)`\n          )\n        }\n      }\n    }\n\n    return data\n  }\n\n  import(data: ReturnType<(typeof this)['export']>) {\n    this.numItems = data.numItems\n    this.errorRate = data.errorRate\n    this.numBits = data.numBits\n    this.numHashes = data.numHashes\n    this.bitArray = data.bitArray\n  }\n\n  add(item: string) {","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/vercel/next.js/blob/0eb377541648e63402a47b38fee00a8d0ce8f8f1/packages/next/src/shared/lib/bloom-filter.ts#L41-L77","documentation":"Error \"Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate ${this.errorRate} resulted in size ${filterData.length} bytes, ${gzipSize} bytes (gzip)\" thrown in vercel/next.js.","triggerScenarios":"Thrown at packages/next/src/shared/lib/bloom-filter.ts:59 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the bloom filter error rate (e.g. to 0.001 or higher) to keep the filter size reasonable.","Reduce the number of items stored in the filter."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eb377541648e63402a47b38fee00a8d0ce8f8f1","analyzedAt":"2026-08-19T02:10:13.922Z","contentChangedAt":"2026-08-19T02:10:13.922Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}