Deep Pagination Memory Explosion
criticallatencyUpdated Feb 18, 2024
Queries with large 'start' parameters (deep pagination) or requesting excessive rows force Solr to allocate memory for all results up to that offset, causing unexpected memory exhaustion even for simple queries.
How to detect:
Identify queries with start parameter >1000 or rows parameter >100. Monitor memory allocation spikes correlated with specific query patterns. Check for OOM errors following deep pagination requests.
Recommended action:
Configure application to request only needed rows (typically 10-20). For deep pagination requirements, implement cursor-based pagination instead of offset-based. Add query validation to reject excessively large start/rows parameters.