infra icon indicating copy to clipboard operation
infra copied to clipboard

Fix pprof handlers to not use a db transaction

Open dnephin opened this issue 2 years ago • 2 comments

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:

  1. 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
  2. API handlers that do require a transaction should start their own.

dnephin avatar May 27 '22 19:05 dnephin

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.

github-actions[bot] avatar Jul 30 '22 02:07 github-actions[bot]

Still relevant

dnephin avatar Aug 02 '22 14:08 dnephin

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.

stale[bot] avatar Oct 01 '22 20:10 stale[bot]

Fixed by #3299, pprof handler now has a separate read-only txn.

dnephin avatar Oct 02 '22 15:10 dnephin