Chalk home page
Docs
API
CLI
  1. Development
  2. Common Errors

We’ve compiled some common errors that people come across, as well as some approaches to debug these errors and their most common root causes. If you are still struggling to debug, please reach out in your support channel!

Query Errors

These are errors you would encounter when running queries, either manual or orchestrated.

Unexpected query results

If you’re receiving either 0 rows when you expect a non-zero query result, or if the feature values that you’re seeing in your query results do not match what you’re expecting, we recommend that you follow the steps in our guide for debugging queries. This includes some common tips and tricks, such as using store_plan_stages and stepping through the query plan.

Unexpected Chalk server error with status code 401

The 401 status code means unauthenticated. We’d recommend verifying that the token you’re using to run the query is correct. To refresh your token, you can run chalk login from the terminal using our CLI and then chalk config to verify that your token has been provisioned for the right environment.

Unexpected Chalk server error with status code 500

The 500 status code means internal server error. This should usually come with another message with more details on the root cause of the error. If you are struggling to debug this, please reach out to us!

Unexpected Chalk server error with status code 502

The 502 status code means bad gateway, which usually indicates timeout or not enough servers. We’d recommend looking at CPU utilization on your cluster to determine if you need to modify the cloud resource configurations. You can do so in the Settings > Resources page in the Chalk dashboard by modifying and applying resource configuration JSON changes under Advanced Resource Configuration. However, we’d also encourage reaching out to us for discussion on how to optimize resource configuration for your environment!

Query Timeout / Unclear Failure

If you are executing a long-running query from a notebook or somewhere locally, the client’s polling for query status might have a timeout shorter than the query’s runtime. If the query times out before completion, we’d recommend verifying whether the query is still running in the dashboard by looking at the query run page and validating that there is a pod in the cluster running the query. It’s possible that your query may also complete after the polling timeout, in which case you can view the query status in the dashboard.

Please double check that all features have resolvers and resolvers do not have circular dependencies.

The first thing to validate is that every feature can be mapped to a resolver output. If all features have resolvers, then you might see this error message if Chalk is unable to construct a dependency graph for resolving the features that you are querying. This is usually a result of a join that cannot be processed. Please reduce the number of output features in your query until you have identified a minimal set that reproduces the circular dependency error and reach out to us with this context!

Duplicate Resolver Shortname

The first thing to check is whether there actually are duplicate resolvers by the same name. If there are not, this error message can also sometimes be an indicator of a missing import. If you are unable to determine if your recent changes required an import, you can use a linting tool to find out, such as pylint.

chalk apply Errors

These are errors you would encounter when running chalk apply or chalk apply --branch.

Branch server might still be starting

You would usually encounter this error when running chalk apply --branch. In the Chalk dashboard under Branches, you can check the status of the branch server. You can also kill lingering processes on branches, such as long-running queries, by stopping and restarting the branch server in the dashboard.

Could not connect to server when running chalk apply

If you’ve verified that you have a token and are properly authenticated, then you should also verify what role you have within the Chalk environment. The developer role can only run chalk apply --branch rather than chalk apply.

Deployed Errors

These are errors that you might observe through metrics monitors on deployed and orchestrated features and resolvers, as opposed to errors you would encounter in local development.

Elevated number of errors (e.g. 502/504's)

Typically these errors are an indication of a misalignment in load and resource configuration. Please reach out to us in your support channels with context on data scale and current resource configurations and we can help you identify mitigation strategies to avoid these errors!

Returning stale features

If you’re seeing stale features, we’d recommend ensuring that you have max_staleness set for the features to configure the maximum staleness allowed for the features, so that Chalk will know to recompute fresh values as specified.