invoke-ai/InvokeAI · error · HTTPException
Error setting recall parameter {param_key}
Error message
Error setting recall parameter {param_key} What it means
HTTP 500 raised when persisting an individual recall parameter via client_state_persistence.set_by_key throws (storage backend failure, serialization problem, etc.). The failure is logged with the underlying exception and the endpoint aborts with a generic detail naming the offending parameter key.
Source
Thrown at invokeai/app/api/routers/recall_parameters.py:493
else:
provided_params = {k: v for k, v in parameters.model_dump().items() if v is not None}
if not provided_params:
return {"status": "no_parameters_provided", "updated_count": 0}
# Store each parameter in client state scoped to the current user
updated_count = 0
for param_key, param_value in provided_params.items():
# Convert parameter values to JSON strings for storage
value_str = json.dumps(param_value)
try:
ApiDependencies.invoker.services.client_state_persistence.set_by_key(
current_user.user_id, f"recall_{param_key}", value_str
)
updated_count += 1
except Exception as e:
logger.error(f"Error setting recall parameter {param_key}: {e}")
raise HTTPException(
status_code=500,
detail=f"Error setting recall parameter {param_key}",
)
logger.info(f"Updated {updated_count} recall parameters for queue {queue_id}")
# Resolve model name to key if a model was provided
if "model" in provided_params and isinstance(provided_params["model"], str):
model_name = provided_params["model"]
model_key = resolve_model_name_to_key(model_name, ModelType.Main)
if model_key:
logger.info(f"Resolved model name '{model_name}' to key '{model_key}'")
provided_params["model"] = model_key
else:
logger.warning(f"Could not resolve model name '{model_name}' to a model key")
# Remove model from parameters if we couldn't resolve it
del provided_params["model"]View on GitHub (pinned to 0b6a024f2f)
Solutions
- Check the server log — the underlying exception is logged as 'Error setting recall parameter {param_key}: {e}'
- Verify the client-state persistence backend (e.g. SQLite file) is writable and not locked
- Retry the request — the error is per-parameter and may be transient
- Reduce/sanitize the value being recalled if it is unusually large or malformed
- Confirm no recent schema migration left the state store incompatible
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-flight: ensure the state store backend is reachable/writable
// (server-side check example)
if not os.access(state_db_path, os.W_OK):
raise RuntimeError('client state store not writable') Try / catch
try {
await api.recallParameters(queueId, params);
} catch (e) {
if (e.status === 500 && /Error setting recall parameter/.test(e.body?.detail ?? '')) {
await sleep(1000);
await api.recallParameters(queueId, params); // retry transient storage failure
} else throw e;
} Prevention
- Monitor disk space and file locks on the client-state persistence store
- Keep recall values small and serializable
- Add a brief retry with backoff for transient storage errors
- Check state-store health after upgrades/migrations
When it happens
Trigger: POST /api/v1/recall_parameters/{queue_id} where client state storage (persistence service/database) fails for a given recall_{param_key}: storage down, DB locked/misconfigured, oversized or unserializable value_str, or a state-store schema issue.
Common situations: SQLite file locked by another process; disk full or permissions issue on the state store; very large recall values exceeding storage limits; degraded database after an upgrade.
Related errors
- Error getting client state
- Error setting client state
- Error getting client state keys
- Error deleting client state key
- Failed to add image to board
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/af810ab2f902b0dc.
Report an issue: GitHub.