WFP-VAM / prism-app

PRISM is an interactive map-based dashboard that simplifies the integration of geospatial data on hazards, along with information on socioeconomic vulnerability
MIT License
50 stars 34 forks source link

Investigate database error in the API - "Can't reconnect until invalid transaction is rolled back" #575

Open wadhwamatic opened 2 years ago

wadhwamatic commented 2 years ago

On both local and deployed instances for Cambodia, kobo form layers are no longer loading after authenticating. The API returns an error. See screenshots captured from this deployment https://prism-khm-internal-demo.surge.sh/

Screen Shot 2022-10-03 at 15 11 53 Screen Shot 2022-10-03 at 15 16 14 Screen Shot 2022-10-03 at 15 16 23
ericboucher commented 2 years ago

I was able to fix this with a restart of the API. But we should investigate how to avoid this error.

There was some error with a database transaction. Here is the additonal context:

api        | ERROR:app.auth:Can't reconnect until invalid transaction is rolled back. (Background on this error at: https://sqlalche.me/e/14/8s2b)
wadhwamatic commented 2 years ago

@ericboucher - thanks for implementing the fix. Will you create an issue to investigate the underlying cause or should we track it here?