Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-10896

ISE when voting: LOCK vote IN SHARE ROW EXCLUSIVE MODE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Edit system
    • None

      While approving ca. 98 edits in background tab with a request rate of 1 sec (using a modified version of the fast cancel script) following ISE occurred in foreground tab when voting regularly:

      Caught exception in MusicBrainz::Server::Controller::Edit->enter_votes "Failed query:
      	'LOCK vote IN SHARE ROW EXCLUSIVE MODE'
      	()
      57014 DBD::Pg::st execute failed: ERROR:  canceling statement due to statement timeout [for Statement "LOCK vote IN SHARE ROW EXCLUSIVE MODE"]
       at lib/Sql.pm line 116.
      	Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError::StatementTimedOut=HASH(0x1e348ca0)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123
      	Try::Tiny::try(CODE(0x1e3482d0), Try::Tiny::Catch=REF(0x1e348210)) called at lib/Sql.pm line 117
      	Sql::do(Sql=HASH(0x17995be0), "LOCK vote IN SHARE ROW EXCLUSIVE MODE") called at lib/MusicBrainz/Server/Data/Vote.pm line 53
      	MusicBrainz::Server::Data::Vote::__ANON__() called at lib/Sql.pm line 322
      	Sql::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1e348030), Try::Tiny::Catch=REF(0x1e346588)) called at lib/Sql.pm line 335
      	Sql::_auto_transaction(CODE(0x1e3466f0), Sql=HASH(0x17995be0)) called at lib/Sql.pm line 340
      	Sql::_run_in_transaction_one(CODE(0x1e3466f0), Sql=HASH(0x17995be0)) called at lib/Sql.pm line 355
      	Sql::run_in_transaction(CODE(0x1e3466f0), Sql=HASH(0x17995be0)) called at lib/MusicBrainz/Server/Data/Vote.pm line 127
      	MusicBrainz::Server::Data::Vote::enter_votes(MusicBrainz::Server::Data::Vote=HASH(0x146b0e70), MusicBrainz::Server::Authentication::User=HASH(0x1d252170), HASH(0x1e33f9e8), HASH(0x1d247e28), HASH(0x1e342480), HASH(0x1e0324a0), HASH(0x1e3214b0), HASH(0x1e402740), HASH(0x1e332670), ...) called at lib/MusicBrainz/Server/Data/Edit.pm line 862
      	MusicBrainz::Server::Data::Edit::__ANON__() called at lib/Sql.pm line 322
      	Sql::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1e346378), Try::Tiny::Catch=REF(0x17c5bda0)) called at lib/Sql.pm line 335
      	Sql::_auto_transaction(CODE(0x1e346150), Sql=HASH(0x17995be0)) called at lib/Sql.pm line 340
      	Sql::_run_in_transaction_one(CODE(0x1e346150), Sql=HASH(0x17995be0)) called at lib/Sql.pm line 355
      	Sql::run_in_transaction(CODE(0x1e346150), Sql=HASH(0x17995be0)) called at lib/MusicBrainz/Server/Data/Edit.pm line 876
      	MusicBrainz::Server::Data::Edit::insert_votes_and_notes(MusicBrainz::Server::Data::Edit=HASH(0x13220768), MusicBrainz::Server::Authentication::User=HASH(0x1d252170), "votes", ARRAY(0x1e345f70), "notes", ARRAY(0x1e346048)) called at lib/MusicBrainz/Server/Controller/Edit.pm line 107
      	MusicBrainz::Server::Controller::Edit::enter_votes(MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358
      	Catalyst::Action::execute(Catalyst::Action=HASH(0x152b5048), MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	Catalyst::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b5048)) called at lib/Catalyst/Plugin/Sentry.pm line 23
      	Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b5048)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353
      	Catalyst::Action::dispatch(Catalyst::Action=HASH(0x152b5048), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 170
      	Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358
      	Catalyst::Action::execute(Catalyst::Action=HASH(0x152b2150), MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	Catalyst::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b2150)) called at lib/Catalyst/Plugin/Sentry.pm line 23
      	Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b2150)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353
      	Catalyst::Action::dispatch(Catalyst::Action=HASH(0x152b2150), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261
      	Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x8dede88), "forward", MusicBrainz::Server=HASH(0x1d928a78), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241
      	Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x8dede88), MusicBrainz::Server=HASH(0x1d928a78), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 483
      	Catalyst::forward(MusicBrainz::Server=HASH(0x1d928a78), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 134
      	Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358
      	Catalyst::Action::execute(Catalyst::Action=HASH(0x152b1d30), MusicBrainz::Server::Controller::Edit=HASH(0x15093d40), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2061
      	Catalyst::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b1d30)) called at lib/Catalyst/Plugin/Sentry.pm line 23
      	Catalyst::Plugin::Sentry::execute(MusicBrainz::Server=HASH(0x1d928a78), "MusicBrainz::Server::Controller::Edit", Catalyst::Action=HASH(0x152b1d30)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353
      	Catalyst::Action::dispatch(Catalyst::Action=HASH(0x152b1d30), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261
      	Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x8dede88), "forward", MusicBrainz::Server=HASH(0x1d928a78), "/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241
      	Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x8dede88), MusicBrainz::Server=HASH(0x1d928a78), "/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 483
      	Catalyst::forward(MusicBrainz::Server=HASH(0x1d928a78), "/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 107
      	Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x8dede88), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2007
      	Catalyst::dispatch(MusicBrainz::Server=HASH(0x1d928a78)) called at lib/MusicBrainz/Server.pm line 324
      	MusicBrainz::Server::__ANON__() called at lib/MusicBrainz/Server.pm line 299
      	MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x1d928a78), CODE(0x1d22b578)) called at lib/MusicBrainz/Server.pm line 325
      	Class::MOP::Class:::around(CODE(0x47cb018), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164
      	Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x1d928a78)) called at lib/MusicBrainz/Server.pm line 339
      	Class::MOP::Class:::around(CODE(0x1512f560), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164
      	Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x1d928a78)) called at lib/MusicBrainz/Server.pm line 417
      	Class::MOP::Class:::around(CODE(0x1512f830), MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 164
      	Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 35
      	MusicBrainz::Server::_wrapped_dispatch(MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 95
      	MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x1d928a78)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2413
      	Catalyst::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1d312930), Try::Tiny::Catch=REF(0x1d442920)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2422
      	Catalyst::handle_request("MusicBrainz::Server", "env", HASH(0x1d2161b8), "response_cb", CODE(0x1795f5f0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Engine.pm line 807
      	Catalyst::Engine::__ANON__(CODE(0x1795f5f0)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 32
      	Plack::Middleware::HTTPExceptions::try {...} () called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 102
      	eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 93
      	Try::Tiny::try(CODE(0x1d251cf0), Try::Tiny::Catch=REF(0x1d835598)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 41
      	Plack::Middleware::HTTPExceptions::__ANON__(CODE(0x1d83db58)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339
      	Plack::Util::__ANON__(CODE(0x1d216170)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339
      	Plack::Util::__ANON__(CODE(0x1d83a418)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339
      	Plack::Util::__ANON__(CODE(0x1d839560)) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 377
      	Starlet::Server::handle_connection(Plack::Handler::Starlet=HASH(0x12a97d08), HASH(0x1d2161b8), IO::Socket::INET=GLOB(0x1799a540), CODE(0x155f4768), "", "", "") called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 190
      	Starlet::Server::accept_loop(Plack::Handler::Starlet=HASH(0x12a97d08), CODE(0x155f4768), 57) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Handler/Starlet.pm line 80
      	Plack::Handler::Starlet::run(Plack::Handler::Starlet=HASH(0x12a97d08), CODE(0x155f4768)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Loader.pm line 84
      	Plack::Loader::run(Plack::Loader=HASH(0x2384dc0), Plack::Handler::Starlet=HASH(0x12a97d08)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Runner.pm line 277
      	Plack::Runner::run(Plack::Runner=HASH(0x216dab8)) called at /home/musicbrainz/carton-local/bin/plackup line 7
       at lib/Sql.pm line 335.
       at lib/Sql.pm line 335."
      Stack trace:
      line
      line
      line
      line
      Time: 2020-06-10 16:18:12 UTC
      
      Host: b5381b4cb9e1
      
      Interface language: en
      
      URL: https://musicbrainz.org/edit/enter_votes
      
      Request data:
      
      $VAR1 = {
                'query_parameters' => {},
                'body_parameters' => {
                                       'enter-vote.vote.4.vote' => '-1',
                                       'enter-vote.vote.0.vote' => '-1',
                                       'enter-vote.vote.3.vote' => '-1',
                                       'enter-vote.vote.1.vote' => '-1',
                                       'enter-vote.vote.6.edit_id' => '70554366',
                                       'enter-vote.vote.4.edit_id' => '70554344',
                                       'enter-vote.vote.4.edit_note' => '',
                                       'enter-vote.vote.2.edit_id' => '70554318',
                                       'enter-vote.vote.1.edit_note' => '',
                                       'enter-vote.vote.1.edit_id' => '70554312',
                                       'enter-vote.vote.5.edit_id' => '70554358',
                                       'enter-vote.vote.0.edit_id' => '70554299',
                                       'enter-vote.vote.5.vote' => '-1',
                                       'enter-vote.vote.3.edit_note' => '',
                                       'enter-vote.vote.2.edit_note' => '',
                                       'enter-vote.vote.2.vote' => '-1',
                                       'url' => 'https://musicbrainz.org/search/edits?order=asc&conditions.0.field=voter&conditions.0.operator=me&conditions.0.name=&conditions.0.voter_id=&conditions.0.args=no&conditions.1.field=status&conditions.1.operator=%3D&conditions.1.args=1&conditions.4.field=type&conditions.4.operator=%3D&conditions.4.args=74&conditions.5.field=editor&conditions.5.operator=not_me&conditions.5.name=&conditions.5.args.0=',
                                       'enter-vote.vote.6.edit_note' => '',
                                       'enter-vote.vote.5.edit_note' => '',
                                       'enter-vote.vote.3.edit_id' => '70554335',
                                       'enter-vote.vote.6.vote' => '-1',
                                       'enter-vote.vote.0.edit_note' => ''
                                     }
              };
      

       

      Mass approving also seems to put quite some stress on the servers:
      https://stats.metabrainz.org/d/000000061/mbstats?orgId=1&from=1591804800000&to=1591806600000

      Past examples where one of them was so bad people noticed on IRC:
      https://stats.metabrainz.org/d/000000070/alerts-mb-website?orgId=1&from=1589757000000&to=1589759400000
      https://stats.metabrainz.org/d/000000070/alerts-mb-website?orgId=1&from=1589821800000&to=1589823310000
      https://stats.metabrainz.org/d/000000070/alerts-mb-website?orgId=1&from=1590331200000&to=1590332700000
      https://stats.metabrainz.org/d/000000070/alerts-mb-website?orgId=1&from=1591045200000&to=1591047000000

            bitmap Michael Wiencek
            chaban chaban
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Version Package