humanmade / humanmade/aws-analytics
altis.analytics.index_maintenance cron can cause 413 error in ES
- Dominant language
- JavaScript
- Stars
- 19
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
My site had not cleaned up ES indexes in months, so I had several hundred indexes. Running the maintenance cron then failed everytime:
```
wp --url=https://www.altis-dxp.com cron event run altis.analytics.index_maintenance
Warning: Error in ElasticSearch request: (413) in /usr/src/app/vendor/altis/cloud/inc/namespace.php on line 347
Warning: Analytics: ElasticSearch index deletion failed:
in /usr/src/app/vendor/altis/aws-analytics/inc/namespace.php on line 328
Executed the cron event 'altis.analytics.index_maintenance' in 0.234s.
```
I think this is because the DELETE query is perhaps passing too many indexes and exceeding the request limit for ES. Instead I had to manually delete them all like `http DELETE 'http://localhost:9200/analytics-2020-09*'` (ES supports delete by wildcard)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.