{"record":{"id":"16a98a29a405ac57","repo":"influxdata/influxdb","slug":"adding-a-new-database-would-exceed-limit-of-0-databases","errorCode":null,"errorMessage":"Adding a new database would exceed limit of {0} databases","messagePattern":"Adding a new database would exceed limit of (.+?) databases","errorType":"validation","errorClass":"CatalogError","httpStatus":400,"severity":"error","filePath":"influxdb3_catalog/src/error.rs","lineNumber":155,"sourceCode":"        limit: usize,\n    },\n\n    #[error(\n        \"Schema update for table '{table_name}' would exceed the tag column limit: \\\n        proposed schema would have {attempted} tag columns, but the limit is {limit}\"\n    )]\n    TooManyTagColumns {\n        table_name: TruncatedTableName,\n        attempted: usize,\n        limit: usize,\n    },\n\n    #[error(\n        \"Update to schema would exceed number of tables limit: attempted to create table but already have {current} table(s) (limit: {limit})\"\n    )]\n    TooManyTables { current: usize, limit: usize },\n\n    #[error(\"Adding a new database would exceed limit of {0} databases\")]\n    TooManyDbs(usize),\n\n    #[error(\n        \"Update to schema would exceed the field limit ({limit}) for field family '{field_family}'\"\n    )]\n    TooManyFields { field_family: String, limit: usize },\n\n    #[error(\"Update to schema would exceed the field family limit of {0}\")]\n    TooManyFieldFamilies(usize),\n\n    #[error(\n        \"table '{table_name}' in storage mode {storage_mode:?} cannot allocate more legacy column IDs\"\n    )]\n    LegacyColumnIdsExhausted {\n        table_name: Arc<str>,\n        storage_mode: StorageMode,\n    },\n","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_catalog/src/error.rs#L137-L173","documentation":"Thrown when adding a new database would exceed the configured limit on the total number of databases in the catalog. The error reports the maximum allowed (`{0}`); the CREATE DATABASE (or implicit DB creation via write) is rejected.","triggerScenarios":"CREATE DATABASE or writing to a not-yet-existing database name when the instance already holds the maximum number of databases.","commonSituations":"One-database-per-customer/tenant architectures that outgrow the limit; automated pipelines dynamically creating databases per day/tenant; misconfigured limit after migrating to a multi-tenant setup.","solutions":["Reuse existing databases with tables/tags instead of creating a new database per tenant or time period","Delete/archive unused databases (DELETE DATABASE) to free capacity","Raise the database limit in the server configuration","Move to a multi-node/partitioned deployment strategy for tenant isolation instead of DB-per-tenant"],"exampleFix":"// before: dynamic DB per tenant\nCREATE DATABASE tenant_{id}\n// after: single DB, tenant as tag\nCREATE DATABASE tenants\n-- write: measurement,tenant_id={id} ...","handlingStrategy":"validation","validationCode":"const DB_LIMIT = 100; // instance-configured\nconst dbs = await adminApi.listDatabases();\nif (dbs.length >= DB_LIMIT && !dbs.includes(targetDb)) {\n  throw new Error(`database limit ${DB_LIMIT} reached`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await catalog.createDatabase(name);\n} catch (e) {\n  if (/exceed limit of \\d+ databases/.test(String(e.message))) {\n    // reuse existing db or raise limit\n  } else throw e;\n}","preventionTips":["Avoid database-per-tenant/time-period designs; use tables and tags","If tenant isolation is required, plan partitioning strategy up front","Audit and clean up stale databases periodically"],"tags":["database-limit","catalog","capacity","multi-tenant"],"backgroundTag":"value-out-of-range","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}