{"record":{"id":"97322b90cd89d219","repo":"apache/superset","slug":"an-error-occurred-while-creating-the-value","errorCode":null,"errorMessage":"An error occurred while creating the value.","messagePattern":"An error occurred while creating the value\\.","errorType":"exception","errorClass":"TemporaryCacheCreateFailedError","httpStatus":500,"severity":"error","filePath":"superset/commands/explore/form_data/create.py","lineNumber":77,"sourceCode":"            if form_data:\n                state: TemporaryExploreState = {\n                    \"owner\": get_user_id(),\n                    \"datasource_id\": datasource_id,\n                    \"datasource_type\": DatasourceType(datasource_type),\n                    \"chart_id\": chart_id,\n                    \"form_data\": form_data,\n                }\n                timeout = app.config[\"EXPLORE_FORM_DATA_CACHE_CONFIG\"].get(\n                    \"CACHE_DEFAULT_TIMEOUT\"\n                )\n                cache_manager.explore_form_data_cache.set(key, state, timeout=timeout)\n                cache_manager.explore_form_data_cache.set(\n                    contextual_key, key, timeout=timeout\n                )\n            return key\n        except SQLAlchemyError as ex:\n            logger.exception(\"Error running create command\")\n            raise TemporaryCacheCreateFailedError() from ex\n\n    def validate(self) -> None:\n        if self._cmd_params.form_data:\n            validate_json(self._cmd_params.form_data)\n","sourceCodeStart":59,"sourceCodeEnd":82,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/explore/form_data/create.py#L59-L82","documentation":"TemporaryCacheCreateFailedError is raised by the explore form_data create command when the underlying store raises SQLAlchemyError after the try block (command logging 'Error running create command' then re-raising). Despite the cache-oriented payload, the failure path is a database error — e.g. writing the log/asset row tied to the cached explore state.","triggerScenarios":"POST of explore form data (implicit when opening/saving an Explore URL with form_data) while the metadata database is unreachable, the session is broken mid-request, or a constraint/connection-pool exhaustion surfaces as SQLAlchemyError.","commonSituations":"Metadata DB (MySQL/Postgres) restarts or failovers during heavy dashboard editing. Connection pool saturation under concurrent explore sessions. Long-running sessions whose DB connection was killed by a proxy timeout.","solutions":["Check the webserver logs for the 'Error running create command' traceback — the chained SQLAlchemyError names the real DB problem.","Verify metadata DB connectivity/health and connection pool settings (SQLALCHEMY_DATABASE_URI, pool size/recycle).","Retry the request once the DB is healthy; the operation is not idempotent-harmful (a new cache key is generated).","If it recurs under load, tune pool_pre_ping / pool_size and reduce concurrent explore tabs."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    CreateTemporaryExploreStateCommand(...).run()\nexcept TemporaryCacheCreateFailedError:\n    if metadata_db_healthy():\n        retry_once_with_backoff()\n    else:\n        alert_dba()","preventionTips":["Monitor metadata DB connectivity and pool saturation.","Set pool_pre_ping/pool_recycle on SQLALCHEMY_DATABASE_URI.","Treat recurrence as infra signal, not application logic."],"tags":["explore","cache","database","transient","sqlalchemy"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}