{"record":{"id":"bb232923fe15aadc","repo":"apache/superset","slug":"an-error-occurred-while-accessing-the-value-bb2329","errorCode":null,"errorMessage":"An error occurred while accessing the value.","messagePattern":"An error occurred while accessing the value\\.","errorType":"exception","errorClass":"TemporaryCacheGetFailedError","httpStatus":500,"severity":"error","filePath":"superset/commands/explore/form_data/get.py","lineNumber":60,"sourceCode":"    def run(self) -> Optional[str]:\n        try:\n            key = self._cmd_params.key\n            state: TemporaryExploreState = cache_manager.explore_form_data_cache.get(\n                key\n            )\n            if state:\n                check_access(\n                    state[\"datasource_id\"],\n                    state[\"chart_id\"],\n                    DatasourceType(state[\"datasource_type\"]),\n                )\n                if self._refresh_timeout:\n                    cache_manager.explore_form_data_cache.set(key, state)\n                return state[\"form_data\"]\n            return None\n        except SQLAlchemyError as ex:\n            logger.exception(\"Error running get command\")\n            raise TemporaryCacheGetFailedError() from ex\n\n    def validate(self) -> None:\n        pass\n","sourceCodeStart":42,"sourceCodeEnd":64,"githubUrl":"https://github.com/apache/superset/blob/f4587218dd19d046c3e4d00063e7d27f8a2ed354/superset/commands/explore/form_data/get.py#L42-L64","documentation":"TemporaryCacheGetFailedError is raised by the explore form_data get command when reading or refreshing the cached state raises SQLAlchemyError — the except wraps the cache get, check_access, and the optional re-set for timeout refresh, then logs 'Error running get command' and re-raises this wrapper.","triggerScenarios":"Opening an Explore URL with a cached form_data key (GET) while the metadata database errors — unreachable, mid-failover, or with an exhausted connection pool.","commonSituations":"Dashboard/Explore links failing during DB maintenance windows. Load spikes exhausting the pool so the session/cache-adjacent queries fail. Stale connections after a DB restart behind an unchanged pool config.","solutions":["Inspect the server log for the 'Error running get command' traceback to get the underlying SQLAlchemyError.","Check metadata DB health and Superset's DB connection pool metrics; restart workers if connections are poisoned.","Retry the URL after recovery — the cache entry, if intact, will still be there until its timeout lapses.","Longer term: configure pool_recycle/pool_pre_ping and monitor DB connection counts."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    GetTemporaryExploreStateCommand(...).run()\nexcept TemporaryCacheGetFailedError:\n    if metadata_db_healthy():\n        reload_with_retry()\n    else:\n        show_maintenance_notice()","preventionTips":["Keep metadata DB highly available; explore reads depend on it.","Tune connection pool sizing for peak explore traffic.","Use 'Error running get command' logs to distinguish DB faults from cache faults."],"tags":["explore","cache","database","transient","sqlalchemy"],"backgroundTag":null,"analyzedSha":"f4587218dd19d046c3e4d00063e7d27f8a2ed354","analyzedAt":"2026-08-14T22:39:27.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}