﻿---
title: Stale project reference
description: A cross-project search machine learning datafeeds can reference a linked project that was renamed, unlinked, or never connected. Stale references appear...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7403/troubleshoot/elasticsearch/machine-learning/cps-datafeed-stale-project-reference
products:
  - Elastic Cloud Serverless
  - Elasticsearch
  - Machine Learning
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Unavailable
---

# Stale project reference
A cross-project search machine learning datafeeds can reference a linked project that was renamed, unlinked, or never connected. Stale references appear in `project_routing` expressions or in qualified index patterns such as `old-alias:logs-*`. The datafeeds may skip the project, fail searches, or reject updates depending on how the reference is expressed.
<tip>
  If you can't find your issue here, explore the other [troubleshooting topics](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7403/troubleshoot) or [contact us](/elastic/docs-content/pull/7403/troubleshoot#contact-us).
</tip>


## Diagnose stale project reference

**Symptoms**
- **Messages** or extraction errors reference a project alias that no longer appears in Elastic Cloud linked-project settings.
- `GET _ml/datafeeds/{datafeed_id}/_stats` shows repeated skips for one linked project while others succeed.
- Updating a datafeeds with a qualified index (`project:index`) fails immediately if the named project is missing or unauthorized.
- `project_routing` still contains an `_alias:` tag that matched a project before it was renamed.

**Check configuration and topology**
```json
```

Compare `project_routing`, index qualifiers, and `_remote/info` linked aliases. A project listed in routing but absent from `_remote/info` is a stale reference.
For skip behavior on still-linked but misrouted projects, see also [Linked project skipped](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/7403/troubleshoot/elasticsearch/machine-learning/cps-datafeed-linked-project-skipped).

## Resolve stale project reference

**Confirm the link in Elastic Cloud**
In Elastic Cloud project settings, verify the target project is linked and note its current alias. Re-link the project if the connection was removed.
**Update routing after a rename**
If a linked project alias changed, update `project_routing` and any qualified index references to use the new alias:
```json

{
  "project_routing": "_alias:new-alias-*",
  "indices": ["new-alias:logs-*"]
}
```

Stop the datafeeds before changing qualified index patterns if the job is running.
**Handle qualified indices**
Qualified `project:index` references fail on update when the project is missing — fix the project link or remove the qualifier before retrying. Unqualified index patterns with stale routing may still persist until run time; fix routing proactively to avoid extraction failures.
**Verify recovery**
After updating references, confirm `_remote/info` lists the project and that `GET _ml/datafeeds/{datafeed_id}/_stats` no longer reports skips for the old alias.