Area: API
Sub-Area: Performance
Issue
Search queries and GraphQL API calls timeout or take excessively long to complete. This typically occurs with large result sets, complex queries, or when Elasticsearch is under heavy load.
Common Error Messages:
Search query timeout after 50+ secondsGraphQL query timeout
Solution
Note: For DataHub Cloud customers, infrastructure-level changes (Kubernetes, AWS resources, operating system configurations) are managed by DataHub Support. The solutions below focus on configuration changes that customers can implement.
Reduce query scope:
- Add filters to narrow search results (platform, domain, tags)
- Use specific search terms instead of wildcards
- Limit page size to 50-100 results per request
Use pagination for large result sets:
query searchDatasets {
search(
input: {
type: DATASET
query: "your search"
start: 0
count: 100
filters: [
{ field: "platform", values: ["snowflake"] }
]
}
) {
total
searchResults { ... }
}
}
Avoid deep nested queries:
- Query one level of lineage at a time
- Don't request multiple levels of upstreamLineage/downstreamLineage in one query
- Fetch related entities in separate requests
For cloud customers experiencing persistent timeouts:
- Contact DataHub Support to review Elasticsearch health
- Support can scale resources or investigate performance issues
- Provide specific slow queries and timestamps for investigation
Optimize search indexing:
- Ensure Elasticsearch indices are healthy
- Check for index fragmentation or large segment sizes
- Request index optimization from support if needed
Additional Notes
Always backup your DataHub configuration before making changes. Test solutions in a non-production environment when possible.
Related Documentation
Related Tickets: - 5853
Related Tickets
- 5853
Tags:
performance, timeout, elasticsearch, troubleshooting