Skip to content

Avoid getting stuck in transaction #47

@pnorman

Description

@pnorman

Something caused a failed transaction on a storage connection when live-serving.

  File "/home/pnorman/spirit/tilekiln/lib/python3.11/site-packages/tilekiln/tileset.py", line 55, in get_tile
    return self.storage.get_tile(self.id, tile)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pnorman/spirit/tilekiln/lib/python3.11/site-packages/tilekiln/storage.py", line 188, in get_tile
    cur.execute(f'''SELECT generated, tile FROM "{self.__schema}"."{id}"
  File "/home/pnorman/spirit/tilekiln/lib/python3.11/site-packages/psycopg/cursor.py", line 732, in execute
    raise ex.with_traceback(None)
psycopg.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block

I don't know what the cause of the error is, but if there is something wrong it shouldn't lock up the serving thread forever. Maybe autocommit would work? I need to look at the options in the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions