Skip to content

A failing mapmaker run can prevent subsequent making requests. #76

Description

@dbrnz

Map making requests are queued to ensure that only a single map is made at a time, avoiding any potential timing conflicts with concurrent access to databases, etc. An outermost try ... except block around the mapmaker process should catch errors and allow the next queued request to proceed. This though doesn't always work as intended -- in this case, the server log contained the following but the server still thought mapmaker was running and didn't allow a waiting request to start.

2026-10-01 00:35:29 [warning  ] Unknown anatomical entity      entity=UBERON:0006464 type=knowledge
2026-10-01 00:35:30 [warning  ] Couldn't access endpoint       endpoint=https://scicrunch.org/api/1/ilx/search/curie/ILX:0795048 error='Too Many Requests' type=knowledge
2026-10-01 00:35:30 [warning  ] Unknown anatomical entity      entity=ILX:0795048 type=knowledge
Exception in thread maker-thread:
Traceback (most recent call last):
  File "/home/ubuntu/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/threading.py", line 1075, in _bootstrap_inner
    self.run()
  File "/home/ubuntu/services/staging-flatmap-server/mapserver/maker/__init__.py", line 335, in run
    self.__loop.run_until_complete(self._run())
  File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
  File "/home/ubuntu/services/staging-flatmap-server/mapserver/maker/__init__.py", line 343, in _run
    process.read_log_lines()
  File "/home/ubuntu/services/staging-flatmap-server/mapserver/maker/__init__.py", line 217, in read_log_lines
    message = json.loads(log_line)
              ^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/json/decoder.py", line 338, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/.local/share/uv/python/cpython-3.12.13-linux-x86_64-gnu/lib/python3.12/json/decoder.py", line 354, in raw_decode
    obj, end = self.scan_once(s, idx)
               ^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 71 (char 70)
2026-10-01T00:40:01.003199Z [critical ] Mapmaker succeeded             id=human-flatmap_male models=NCBITaxon:9606 path=PosixPath('/home/ubuntu/services/staging-flatmap-server/flatmaps/368d9f16-2076-5a26-a2ea-f06c54c7de90') uuid=368d9f16-2076-5a26-a2ea-f06c54c7de90

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions