I tried exporting a Library from the server (at what I assume is time 20:10 in the logs), and it was taking way longer than it seemed like it should have (it was just 19 multiple choice and checkbox Problems). Eventually (at time 20:13) it finished, but there was an error that came along with it:
“too_many_clauses’, ‘reason’: ‘maxClauseCount is set to 1024’}”
and
ERROR/ForkPoolWorker-17] Indexing error encountered, courseware index may be out of date course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:14:31,845: WARNING/ForkPoolWorker-17] POST http://elasticsearch:9200/courseware_content/_search [status:400 request:0.005s]
cms-worker_1 | [2023-03-08 20:14:31,846: ERROR/ForkPoolWorker-17] error while searching index - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
-------------------[cut]------------------------
cms-worker_1 | [2023-03-08 20:14:31,846: ERROR/ForkPoolWorker-17] Indexing error encountered, courseware index may be out of date course-v1:MyOrg+MyClass+V1 - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
Could this be part of the problem? If so, how do I either increase the maxClauseCount, or force update the elasticsearch(?) indexing?
@regis I can see there’s some elasticsearch configuration options in tutor (like ELASTICSEARCH_HEAP_SIZE). Is there a way to increase maxClauseCount? If not, should I file a ticket for this?
Full logs below:
lms-worker_1 | 2023-03-08 20:10:07,741 INFO 1 [celery.worker.strategy] [user None] [ip None] strategy.py:161 - Task openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache_v2[d2e9ee66-34a0-43bf-af41-c53d484c728e] received
lms-worker_1 | 2023-03-08 20:10:14,673 INFO 221 [openedx.core.djangoapps.content.block_structure.store] [user None] [ip None] store.py:165 - BlockStructure: Added to cache; block-v1:MyOrg+MyClass+V1+type@course+block@course, size: 86162
lms-worker_1 | 2023-03-08 20:10:14,681 INFO 221 [celery.app.trace] [user None] [ip None] trace.py:131 - Task openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache_v2[05c2ecca-880e-4005-9bb4-618dd6aa1fe2] succeeded in 13.269585105008446s: None
lms-worker_1 | 2023-03-08 20:10:51,363 INFO 221 [openedx.core.djangoapps.content.block_structure.store] [user None] [ip None] store.py:165 - BlockStructure: Added to cache; block-v1:MyOrg+MyClass+V1+type@course+block@course, size: 87187
lms-worker_1 | 2023-03-08 20:10:51,371 INFO 221 [celery.app.trace] [user None] [ip None] trace.py:131 - Task openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache_v2[d2e9ee66-34a0-43bf-af41-c53d484c728e] succeeded in 13.347861725022085s: None
cms-worker_1 | [2023-03-08 20:13:49,650: INFO/ForkPoolWorker-16] POST http://elasticsearch:9200/_bulk [status:200 request:0.069s]
cms-worker_1 | [2023-03-08 20:13:50,643: WARNING/ForkPoolWorker-16] POST http://elasticsearch:9200/courseware_content/_search [status:400 request:0.959s]
cms-worker_1 | [2023-03-08 20:13:50,643: ERROR/ForkPoolWorker-16] error while searching index - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
cms-worker_1 | Traceback (most recent call last):
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/search/elastic.py", line 645, in search
cms-worker_1 | es_response = self._es.search(index=self.index_name, body=body, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
cms-worker_1 | return func(*args, params=params, headers=headers, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 1670, in search
cms-worker_1 | return self.transport.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
cms-worker_1 | raise e
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
cms-worker_1 | status, headers_response, data = connection.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
cms-worker_1 | self._raise_error(response.status, raw_data)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
cms-worker_1 | raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
cms-worker_1 | elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: maxClauseCount is set to 1024')
cms-worker_1 | [2023-03-08 20:13:50,644: ERROR/ForkPoolWorker-16] Indexing error encountered, courseware index may be out of date course-v1:MyOrg+MyClass+V1 - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
cms-worker_1 | Traceback (most recent call last):
cms-worker_1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 260, in index
cms-worker_1 | cls.remove_deleted_items(searcher, structure_key, indexed_items)
cms-worker_1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 109, in remove_deleted_items
cms-worker_1 | response = searcher.search(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/search/elastic.py", line 645, in search
cms-worker_1 | es_response = self._es.search(index=self.index_name, body=body, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
cms-worker_1 | return func(*args, params=params, headers=headers, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 1670, in search
cms-worker_1 | return self.transport.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
cms-worker_1 | raise e
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
cms-worker_1 | status, headers_response, data = connection.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
cms-worker_1 | self._raise_error(response.status, raw_data)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
cms-worker_1 | raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
cms-worker_1 | elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: maxClauseCount is set to 1024')
cms-worker_1 | [2023-03-08 20:13:50,649: ERROR/ForkPoolWorker-16] cms.djangoapps.contentstore.tasks.update_search_index[7e93182d-80c7-4495-b614-90a2cf34b865]: Search indexing error for complete course course-v1:MyOrg+MyClass+V1 - Error(s) present during indexing - ['General indexing error occurred']
cms-worker_1 | [2023-03-08 20:13:50,658: INFO/ForkPoolWorker-16] Task cms.djangoapps.contentstore.tasks.update_search_index[7e93182d-80c7-4495-b614-90a2cf34b865] succeeded in 132.37137719092425s: None
cms-worker_1 | [2023-03-08 20:13:50,665: INFO/ForkPoolWorker-16] Updating discussion settings for course: course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:50,740: INFO/ForkPoolWorker-16] Updating existing discussion topic links for course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:50,743: INFO/ForkPoolWorker-16] Creating new discussion topic links for course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:50,746: INFO/ForkPoolWorker-16] Responses of the Open edX Event <org.openedx.learning.discussions.configuration.changed.v1>:
cms-worker_1 | [(<function handle_course_discussion_config_update at 0x7f06ab6ff670>, None)]
cms-worker_1 | [2023-03-08 20:13:50,748: INFO/ForkPoolWorker-16] Task openedx.core.djangoapps.discussions.tasks.update_discussions_settings_from_course_task[2e7caf0b-9967-4926-8d86-f5844b760916] succeeded in 0.08524999290239066s: None
cms-worker_1 | [2023-03-08 20:13:50,753: INFO/MainProcess] Task openedx.core.djangoapps.course_apps.tasks.update_course_apps_status[ab1dc55e-a32a-4a4e-a44d-307c3ea6a020] received
cms-worker_1 | [2023-03-08 20:13:50,755: INFO/ForkPoolWorker-16] Starting XBlockCaches update for course_key: course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:51,064: INFO/MainProcess] Task lms.djangoapps.discussion.tasks.update_discussions_map[72a7a5ae-c9ed-4169-81cf-d680d9af293a] received
cms-worker_1 | [2023-03-08 20:13:51,069: INFO/MainProcess] Task cms.djangoapps.contentstore.tasks.export_olx[5032675a-6360-4e52-9e58-626d47e7ec6e] received
cms-worker_1 | [2023-03-08 20:13:53,922: INFO/ForkPoolWorker-16] Ending XBlockCaches update for course_key: course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:53,925: INFO/ForkPoolWorker-16] Task openedx.core.djangoapps.bookmarks.tasks.update_xblocks_cache[bcef2f2f-a178-4ff2-b55e-595d73c9bcbc] succeeded in 3.1712943569291383s: None
cms-worker_1 | [2023-03-08 20:13:53,932: INFO/ForkPoolWorker-16] openedx.core.djangoapps.course_apps.tasks.update_course_apps_status[ab1dc55e-a32a-4a4e-a44d-307c3ea6a020]: Caching course apps status for course with id: course-v1:MyOrg+MyClass+V1
cms-worker_1 | [2023-03-08 20:13:54,046: WARNING/ForkPoolWorker-16] Flag 'course_live.enable_course_live' accessed without a request, which is likely in the context of a celery task.
cms-worker_1 | [2023-03-08 20:13:54,058: WARNING/ForkPoolWorker-16] Flag 'teams.enable_teams_app' accessed without a request, which is likely in the context of a celery task.
cms-worker_1 | [2023-03-08 20:13:54,094: INFO/ForkPoolWorker-16] Task openedx.core.djangoapps.course_apps.tasks.update_course_apps_status[ab1dc55e-a32a-4a4e-a44d-307c3ea6a020] succeeded in 0.16263084998354316s: None
cms-worker_1 | [2023-03-08 20:13:54,343: INFO/ForkPoolWorker-16] Task lms.djangoapps.discussion.tasks.update_discussions_map[72a7a5ae-c9ed-4169-81cf-d680d9af293a] succeeded in 0.24337788205593824s: None
cms-worker_1 | [2023-03-08 20:13:54,793: INFO/MainProcess] Task cms.djangoapps.cms_user_tasks.tasks.send_task_complete_email[c0e59cda-d5a4-4555-b4f2-380ff55e7647] received
cms-worker_1 | [2023-03-08 20:13:54,798: INFO/ForkPoolWorker-16] Task cms.djangoapps.contentstore.tasks.export_olx[5032675a-6360-4e52-9e58-626d47e7ec6e] succeeded in 0.3992679190123454s: None
cms-worker_1 | [2023-03-08 20:13:55,702: INFO/ForkPoolWorker-16] cms.djangoapps.cms_user_tasks.tasks.send_task_complete_email[c0e59cda-d5a4-4555-b4f2-380ff55e7647]: Task complete email has been sent to User admin@mysite.com
cms-worker_1 | [2023-03-08 20:13:55,704: INFO/ForkPoolWorker-16] Task cms.djangoapps.cms_user_tasks.tasks.send_task_complete_email[c0e59cda-d5a4-4555-b4f2-380ff55e7647] succeeded in 0.9000500189140439s: None
cms-worker_1 | [2023-03-08 20:14:31,585: INFO/ForkPoolWorker-17] GET http://elasticsearch:9200/courseware_content/_mapping [status:200 request:0.002s]
cms-worker_1 | [2023-03-08 20:14:31,830: INFO/ForkPoolWorker-17] POST http://elasticsearch:9200/_bulk [status:200 request:0.016s]
cms-worker_1 | [2023-03-08 20:14:31,845: WARNING/ForkPoolWorker-17] POST http://elasticsearch:9200/courseware_content/_search [status:400 request:0.005s]
cms-worker_1 | [2023-03-08 20:14:31,846: ERROR/ForkPoolWorker-17] error while searching index - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
cms-worker_1 | Traceback (most recent call last):
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/search/elastic.py", line 645, in search
cms-worker_1 | es_response = self._es.search(index=self.index_name, body=body, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
cms-worker_1 | return func(*args, params=params, headers=headers, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 1670, in search
cms-worker_1 | return self.transport.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
cms-worker_1 | raise e
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
cms-worker_1 | status, headers_response, data = connection.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
cms-worker_1 | self._raise_error(response.status, raw_data)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
cms-worker_1 | raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
cms-worker_1 | elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: maxClauseCount is set to 1024')
cms-worker_1 | [2023-03-08 20:14:31,846: ERROR/ForkPoolWorker-17] Indexing error encountered, courseware index may be out of date course-v1:MyOrg+MyClass+V1 - RequestError(400, 'search_phase_execution_exception', {'error': {'root_cause': [{'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'courseware_content', 'node': '0YuJynDBRSKSPHqmJ7yGGQ', 'reason': {'type': 'query_shard_exception', 'reason': 'failed to create query: maxClauseCount is set to 1024', 'index_uuid': 'xiegEFgxTa2Ll_0trcRvOQ', 'index': 'courseware_content', 'caused_by': {'type': 'too_many_clauses', 'reason': 'maxClauseCount is set to 1024'}}}]}, 'status': 400})
cms-worker_1 | Traceback (most recent call last):
cms-worker_1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 260, in index
cms-worker_1 | cls.remove_deleted_items(searcher, structure_key, indexed_items)
cms-worker_1 | File "/openedx/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 109, in remove_deleted_items
cms-worker_1 | response = searcher.search(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/search/elastic.py", line 645, in search
cms-worker_1 | es_response = self._es.search(index=self.index_name, body=body, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
cms-worker_1 | return func(*args, params=params, headers=headers, **kwargs)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 1670, in search
cms-worker_1 | return self.transport.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
cms-worker_1 | raise e
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
cms-worker_1 | status, headers_response, data = connection.perform_request(
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
cms-worker_1 | self._raise_error(response.status, raw_data)
cms-worker_1 | File "/openedx/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
cms-worker_1 | raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
cms-worker_1 | elasticsearch.exceptions.RequestError: RequestError(400, 'search_phase_execution_exception', 'failed to create query: maxClauseCount is set to 1024')
cms-worker_1 | [2023-03-08 20:14:31,848: ERROR/ForkPoolWorker-17] cms.djangoapps.contentstore.tasks.update_search_index[6dd253e6-8dc0-48c8-88c1-34311e14cbc0]: Search indexing error for complete course course-v1:MyOrg+MyClass+V1 - Error(s) present during indexing - ['General indexing error occurred']
cms-worker_1 | [2023-03-08 20:14:31,850: INFO/ForkPoolWorker-17] Task cms.djangoapps.contentstore.tasks.update_search_index[6dd253e6-8dc0-48c8-88c1-34311e14cbc0] succeeded in 106.26902770798188s: None