{"record":{"id":"0828ee9a2e71ed5a","repo":"yiisoft/yii2","slug":"the-dsn-option-must-be-specified","errorCode":null,"errorMessage":"The \"dsn\" option must be specified.","messagePattern":"The \"dsn\" option must be specified\\.","errorType":"exception","errorClass":"yii\\base\\InvalidConfigException","httpStatus":null,"severity":"error","filePath":"framework/db/Connection.php","lineNumber":1207,"sourceCode":"     * @see openFromPool\n     * @see serverStatusCache\n     */\n    protected function openFromPoolSequentially(array $pool, array $sharedConfig)\n    {\n        if (empty($pool)) {\n            return null;\n        }\n\n        if (!isset($sharedConfig['class'])) {\n            $sharedConfig['class'] = get_class($this);\n        }\n\n        $cache = is_string($this->serverStatusCache) ? Yii::$app->get($this->serverStatusCache, false) : $this->serverStatusCache;\n\n        foreach ($pool as $i => $config) {\n            $pool[$i] = $config = array_merge($sharedConfig, $config);\n            if (empty($config['dsn'])) {\n                throw new InvalidConfigException('The \"dsn\" option must be specified.');\n            }\n\n            $key = [__METHOD__, $config['dsn']];\n            if ($cache instanceof CacheInterface && $cache->get($key)) {\n                // should not try this dead server now\n                continue;\n            }\n\n            /** @var self $db */\n            $db = Yii::createObject($config);\n\n            try {\n                $db->open();\n                return $db;\n            } catch (\\Exception $e) {\n                Yii::warning(\"Connection ({$config['dsn']}) failed: \" . $e->getMessage(), __METHOD__);\n                if ($cache instanceof CacheInterface) {\n                    // mark this server as dead and only retry it after the specified interval","sourceCodeStart":1189,"sourceCodeEnd":1225,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/db/Connection.php#L1189-L1225","documentation":"Error \"The \"dsn\" option must be specified.\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/db/Connection.php:1207 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":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}