Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

altis.analytics.index_maintenance cron can cause 413 error in ES #127

Open
joehoyle opened this issue Nov 25, 2020 · 0 comments
Open

altis.analytics.index_maintenance cron can cause 413 error in ES #127

joehoyle opened this issue Nov 25, 2020 · 0 comments
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now

Comments

@joehoyle
Copy link
Member

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)

@joehoyle joehoyle added the bug Existing functionality isn't behaving as expected label Nov 25, 2020
@jennybeaumont jennybeaumont added the should have Should be done, medium priority for now label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing functionality isn't behaving as expected should have Should be done, medium priority for now
Projects
None yet
Development

No branches or pull requests

3 participants