TencentCloud/TencentDB-Agent-Memory · error
[instance-config] Config source returned empty VDB config fo
Error message
[instance-config] Config source returned empty VDB config for instanceId="${instanceId}" (url=${config?.url}) What it means
InstanceConfigProvider.fetchAndStoreVdb fetches the vector-database config for an instance from its config source. When the source returns null/undefined or a config without a url, the provider logs the error and throws, because a VDB pool entry cannot be created without a connection URL.
Source
Thrown at MemoryCore/src/core/instance-config-provider.ts:222
} finally {
// 清理 in-flight 标记。注意要在 await 之后清理 (即使 fetch 抛错也清),
// 否则一次失败会让该 instanceId 永久卡住。
this.vdbFetchPromises.delete(instanceId);
}
}
/**
* 实际执行 source fetch + 写入 vdbPool。
* 仅由 resolveVdb 内部调用 (并发去重保证只跑一次)。
*/
private async fetchAndStoreVdb(instanceId: string): Promise<VdbConfig> {
const config = await this.source.fetchVdb(instanceId);
// source 返回空 → 直接报错记录日志
if (!config || !config.url) {
const msg = `[instance-config] Config source returned empty VDB config for instanceId="${instanceId}" (url=${config?.url})`;
this.logger.error(msg);
throw new Error(msg);
}
// LRU 淘汰
if (this.vdbPool.size >= this.maxInstances && !this.vdbPool.has(instanceId)) {
this.evictLru();
}
const now = Date.now();
this.vdbPool.set(instanceId, {
config,
expiresAt: now + this.vdbTtlMs,
lastAccessedAt: now,
});
return config;
}
/**View on GitHub (pinned to 3efcd317b8)
Solutions
- Verify the instance exists in the config source and its VDB config includes a url (query the control plane/config service directly for that instanceId)
- Check the config source connectivity (config service address, auth, network) — empty may mean a failed upstream call swallowed into an empty result
- Confirm the instanceId being requested is correct (no truncation/typo)
- If the instance is genuinely gone, stop requesting it / clean up stale references
Example fix
// before (server: no vdb entry provisioned)
instances: ["a1"] // no vdb section for a1
// after
instances: ["a1"]
vdb: { "a1": { url: "http://vdb:19530" } } Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
function hasVdbUrl(config) {
return config != null && typeof config.url === "string" && config.url.length > 0;
} Try / catch
try {
await provider.getVdb(instanceId);
} catch (e) {
if (e.message.includes("empty VDB config")) {
logger.error(`no VDB registered for ${instanceId}; check config source`);
}
throw e;
} Prevention
- Provision the VDB config (with url) for every instance before its first request
- Monitor the config source: empty fetches usually mean missing registration or control-plane outage
- Validate instanceIds against the control plane before using them with this provider
When it happens
Trigger: Calling fetchAndStoreVdb (via fetchPromise, i.e. get-or-load of a VDB for an instanceId) where this.source.fetchVdb(instanceId) resolves to undefined/null or an object lacking url.
Common situations: Instance not registered in the config source (control plane has no entry for that instanceId); config service down or returning empty payloads; instanceId typo; stale instance whose config was deleted; partial config written by provisioning pipeline missing the url field.
Related errors
- llm.provider=proxy 需要 memory 系统用户 key —— 请在 yaml metadata.sy
- llm.provider=proxy 且 useMemorySystemUserKey=false 时必须显式 llm.
- teamId is required for an agent prompt setting
- [skill-worker-pool] concurrency must be positive integer, go
- SKILL_COS_REQUIRED
AI-assisted analysis of TencentCloud/TencentDB-Agent-Memory@3efcd317b8 (2026-09-01).
Data as JSON: /api/errors/46ff06e686990291.
Report an issue: GitHub.