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

ES index_closed_exception on some queries because index is closed and reopened every minute #644

Open
tcrsavage opened this issue Jun 23, 2022 · 2 comments
Labels
bug Existing functionality isn't behaving as expected

Comments

@tcrsavage
Copy link

Steps to reproduce:
Related to: #379

  1. Run a large number of queries against 7.1 server with cavalcade jobs also running on hosted environment

See request errors for queries which were made when the index was closed by

https://github.com/humanmade/altis-enhanced-search/blob/0adbdb4736eb9086654e83c09a870f1b3c6464d0/inc/packages/namespace.php#L639

It looks like on_check_package_status is supposed to unschedule it's self, but it does not, so continually schedules altis.search.update_index_settings which fires the callback function above, which closes the index

https://github.com/humanmade/altis-cloud/blob/master/inc/elasticsearch_packages/namespace.php#L269

2 hours ago
Warning[23-Jun-2022 11:58:02 UTC] PHP Warning: Error in ElasticSearch request: {"error":{"root_cause":[{"type":"index_closed_exception","reason":"closed","index_uuid":"Ez_2HEVKTR6y_iITvXFxjA","index":"{index_name}"}],"type":"index_closed_exception","reason":"closed","index_uuid":"Ez_2HEVKTR6y_iITvXFxjA","index":"ep-backendstagingservustvcom-post-12"},"status":400} (400) in /usr/src/app/vendor/altis/cloud/inc/namespace.php on line 387

@tcrsavage tcrsavage added the bug Existing functionality isn't behaving as expected label Jun 23, 2022
@tcrsavage
Copy link
Author

tcrsavage commented Jun 23, 2022

Ahh, too few arguments:

add_action( 'altis.search.check_package_status', __NAMESPACE__ . '\\on_check_package_status', 10, 4 );

@roborourke
Copy link
Contributor

🤦 will get that patched up.

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
Projects
None yet
Development

No branches or pull requests

2 participants