infra
infra copied to clipboard
Fix pprof handlers to not use a db transaction
Our /debug/pprof
handlers are not very useful right now because the middleware around them start a database transaction. We are currently limited to a single DB transaction at a time, so the profile running prevents any other requests from being handled.
In the short term we can address that by:
- making sure that the authn, authz, "update user lastSeenAt", and "update accessKey last used" operations use a separate transaction (or possibly no transaction). The transaction used by any middleware must be closed before they call the API handler
- API handlers that do require a transaction should start their own.
This issue has not seen any activity in a while. Add a comment if this issue is still relevant, otherwise it will be closed in 7 days.
Still relevant
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Fixed by #3299, pprof handler now has a separate read-only txn.