brazil-data-cube / bdc-stac

SpatioTemporal Asset Catalog Implementation for the Brazil Data Cube
https://bdc-stac.readthedocs.io/en/latest/
GNU General Public License v3.0
6 stars 9 forks source link

STAC service fails when database is restarted #123

Closed rmmariano closed 2 years ago

rmmariano commented 3 years ago

I've created an instance of your STAC service by building its Dockerfile.

I've followed your instructions and I was able to execute the service, but I've got an error.

Your STAC application "holds" the database connection during all its execution, the service does not open and close the database connection on demand.

For example: I needed to restart the container of my database and when I tested the STAC service again, it failed. The application does not work even after the database is running again.

Thanks in advance.

error

raphaelrpl commented 2 years ago

Resolved in c8275eef27281f5b9772c953457bf041bea48afe You can set SQLALCHEMY_ENGINE_OPTIONS & SQLALCHEMY_ENGINE_POOL_RECYCLE for auto pooling recycle