Rapidly deleting ssh keys causes 500 error

Created by: wdamien

Repo steps:

  • Have a bunch of ssh keys added
  • Rapidly click down the list to delete them all
  • A 500 error page eventually shows

I believe this was the corresponding log message:

ActiveRecord::StatementInvalid (SQLite3::BusyException: cannot rollback transaction - SQL statements in progress: rollback transaction): app/controllers/keys_controller.rb:28:in `destroy'