DagsterUserCodeUnreachableError: Could not reach user code server. gRPC Error code: UNAVAILABLE (Serverless)

Last updated: October 9, 2025

Problem

Specifically for Dagster+ Serverless deployments, attempting to add a new code location, or redeploy an existing code location, results in the following error:

dagster.­_core.errors.DagsterUserCodeUnreachableError: Could not reach user code server. gRPC Error code: UNAVAILABLE

Possible causes

  • Typically these errors are caused by user code taking too long to load, or call (such as to an external API) within the user code hanging.

Solutions

  • Profile your code understand where code is hanging or slowing down with the following tools:

    • Add context.log.info() calls within your code and view the results of these calls in the Dagster UI to identify where your code's execution may be reaching before timing out

    • Use py-spy or memray to profile slow or hanging code locally

  • If your project uses dbt assets, make sure your code is generating a dbt manifest at build time (recommended) rather than run time. For more information, see Loading dbt models from a dbt project in the Dagster dbt integration reference.

  • Sometimes the root cause is sensor evaluations constantly timing out. To diagnose and fix sensor timeouts, see Troubleshooting sensor timeouts.

  • If you are a Dagster+ Pro customer, you can contact Sales to discuss increasing your quota for Serverless compute and/or memory.