dapr/dapr · critical · actorerrors.ErrCreatingActor

%w: actor hosting is suspended: no actor state store configu

Error message

%w: actor hosting is suspended: no actor state store configured

What it means

The actor table sets a suspended flag when no actor state store is configured. GetOrCreate then fails with the sentinel actorerrors.ErrCreatingActor wrapped with this message. Every actor activation (method call, timer, reminder) on the suspended table returns this error until a state store initializes.

Source

Thrown at pkg/actors/table/table.go:186

func (t *table) IsActorTypeHosted(actorType string) bool {
	if t.suspended.Load() {
		return false
	}
	_, ok := t.factories.Load(actorType)
	return ok
}

func (t *table) ActorExists(actorType, actorID string) bool {
	v, ok := t.factories.Load(actorType)
	if !ok {
		return false
	}
	return v.(targets.Factory).Exists(actorID)
}

func (t *table) GetOrCreate(actorType, actorID string) (targets.Interface, error) {
	if t.suspended.Load() {
		return nil, fmt.Errorf("%w: actor hosting is suspended: no actor state store configured", actorerrors.ErrCreatingActor)
	}

	factory, ok := t.factories.Load(actorType)
	if !ok {
		return nil, fmt.Errorf("%w: actor type %s not registered", actorerrors.ErrCreatingActor, actorType)
	}

	return factory.(targets.Factory).GetOrCreate(actorID), nil
}

func (t *table) RegisterActorTypes(opts RegisterActorTypeOptions) {
	if len(opts.Factories) == 0 {
		return
	}

	if opts := opts.HostOptions; opts != nil {
		t.entityConfigs = opts.EntityConfigs
	}

View on GitHub (pinned to 74ad417027)

Solutions

  1. Deploy a state store component (category state.store, for example Redis) in the app's namespace.
  2. Check sidecar logs and dapr components output: the component must initialize without errors.
  3. If the component uses scopes, add the app-id to the allowed scopes.
  4. Restart the sidecar after the fix so the table leaves the suspended state.

Example fix

# component.yaml
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: statestore
spec:
  type: state.redis
  version: v1
  metadata:
    - name: redisHost
      value: redis-master:6379
Defensive patterns

Strategy: validation

Validate before calling

// Readiness gate before actor traffic: the sidecar must list an initialized state store.
func actorStateStoreReady(sidecarURL string) bool {
	resp, err := http.Get(sidecarURL + "/v1.0/components")
	if err != nil {
		return false
	}
	defer resp.Body.Close()
	var comps []struct {
		Type string `json:"type"`
	}
	if json.NewDecoder(resp.Body).Decode(&comps) != nil {
		return false
	}
	for _, c := range comps {
		if strings.HasPrefix(c.Type, "state.") {
			return true
		}
	}
	return false
}

Try / catch

if err != nil && errors.Is(err, actorerrors.ErrCreatingActor) && strings.Contains(err.Error(), "suspended") { stop actor traffic, deploy and initialize a state store component, restart the sidecar; do not retry until the config changes }.

Prevention

When it happens

Trigger: Actor method invocation, timer, or reminder delivery when the runtime has no state store component for actors: the component is missing, failed to initialize, or its scopes exclude the app.

Common situations: State store YAML not applied or applied to the wrong namespace. Redis (or the backing store) down when the sidecar started, so component init failed. Teams enable actors without knowing a state store is required.

Related errors


AI-assisted analysis of dapr/dapr@74ad417027 (2026-08-16). Data as JSON: /api/errors/f990dba7526494ac. Report an issue: GitHub.