NASA-PDS / registry-sweepers

Scripts that run regularly on the registry database, to clean and consolidate information
Apache License 2.0
0 stars 1 forks source link

Timeout bug when running legacy dashboard sync #111

Closed jordanpadams closed 3 months ago

jordanpadams commented 3 months ago

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When I did ran the legacy database sync software, I get a timeout exception

🕵️ Expected behavior

I expected the software to retry and complete successfully.

📜 To Reproduce

$ ./docker/sweepers_driver.py --legacy-sync

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jpadams/proj/pds/pdsen/workspace/registry-sweepers/./docker/sweepers_driver.py", line 146, in <module>
    run_sweeper_f()
  File "/Users/jpadams/proj/pds/pdsen/workspace/registry-sweepers/src/pds/registrysweepers/legacy_registry_sync/legacy_registry_sync.py", line 56, in run
    for ok, item in opensearchpy.helpers.streaming_bulk(
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/opensearchpy/helpers/actions.py", line 318, in streaming_bulk
    for bulk_data, bulk_actions in _chunk_actions(
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/opensearchpy/helpers/actions.py", line 164, in _chunk_actions
    for action, data in actions:
  File "/Users/jpadams/proj/pds/pdsen/workspace/registry-sweepers/src/pds/registrysweepers/legacy_registry_sync/solr_doc_export_to_opensearch.py", line 125, in __next__
    doc = next(self.solr_itr)
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/solr_to_es/solrSource.py", line 108, in __next__
    r = requests.get(url)
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
  File "/Users/jpadams/.virtualenvs/registry-sweepers/lib/python3.9/site-packages/requests/models.py", line 818, in generate
    raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(54, 'Connection reset by peer')", ConnectionResetError(54, 'Connection reset by peer'))

🖥 Environment Info

Mac OSx

📚 Version of Software Used

stable

🩺 Test Data / Additional context

N/A

🦄 Related requirements

No response

⚙️ Engineering Details

Note: This prevents us from accurately creating dashboard reports, hence the high severity.

jordanpadams commented 3 months ago

It appears the Solr request may be timing out.