Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoint call fails, if flask-profiler has error #116

Open
amarvin opened this issue Nov 12, 2021 · 1 comment
Open

Endpoint call fails, if flask-profiler has error #116

amarvin opened this issue Nov 12, 2021 · 1 comment

Comments

@amarvin
Copy link

amarvin commented Nov 12, 2021

flask-profiler is awesome, nice work! I'm using it with SQLAlchemy and PostgreSQL. Sometimes there are spikes of usage with my app though, and I get this error:

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL SYSCALL error: EOF detected

which I believe is an error writing the runtime to PostgreSQL occurring when there's many simultaneous database connections. Perhaps flask-profiler could fix this error, by adding a pool_pre_ping=True to the database engine.

Regardless if that error is fixed, I would expect that such an error doesn't also make the endpoint call fail. Couldn't flask-profiler run the "write to database" step in a subprocess that's allowed to fail so that the endpoint can still succeed?

@amarvin
Copy link
Author

amarvin commented Nov 12, 2021

Oh, pre-ping was added in 0f5468c. I'll try installing that commit. Would be great to have a new release with that (#114).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant