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

Speed up creating/editing releases

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    • Edit system
    • None

      For some time I've noticed that creating new releases (and apparently editing existing releases too) takes a considerable amount of time. After hitting "enter edit" you can see the spinning wheel for quite some time before the page finally loads.

      Preparing many releases in advance and submitting them one after another can shorten that wait time but unfortunately this is prone to fail because of deadlocks

      Now, for the first time (for me at least) it had happened that just submitting a single release (with all userscripts disabled even) resulted in a deadlock. (full network logs can be provided if helpful):

      Failed query: 'SELECT pg_advisory_xact_lock(?, id) FROM unnest(?::integer[]) AS id' (22 ARRAY(0x562178d92a28)) 40P01 DBD::Pg::st execute failed: ERROR: deadlock detected DETAIL: Process 947132 waits for ExclusiveLock on advisory lock [16806,22,7,2]; blocked by process 946199. Process 946199 waits for ExclusiveLock on advisory lock [16806,22,6,2]; blocked by process 947132. HINT: See server log for query details. [for Statement "SELECT pg_advisory_xact_lock(?, id) FROM unnest(?::integer[]) AS id" with ParamValues: 1='22', 2='{"6","7","8","9","10"}'] at lib/Sql.pm line 116. Sql::catch {...} (MusicBrainz::Server::Exceptions::DatabaseError=HASH(0x56218befd950)) called at /home/musicbrainz/carton-local/lib/perl5/Try/Tiny.pm line 123 Try::Tiny::try(CODE(0x56218bcf8c80), Try::Tiny::Catch=REF(0x56218af3e230)) called at lib/Sql.pm line 117 Sql::do(Sql=HASH(0x5621867176a8), "SELECT pg_advisory_xact_lock(?, id) FROM unnest(?::integer["..., 22, ARRAY(0x562178d92a28)) called at lib/MusicBrainz/Server/Data/Role/EntityCache.pm line 152 MusicBrainz::Server::Data::Role::EntityCache::_delete_from_cache(MusicBrainz::Server::Data::Recording=HASH(0x562183000f50), 32046806, 32046807, 32046808, 32046809, 32046810) called at lib/MusicBrainz/Server/Data/Track.pm line 228 MusicBrainz::Server::Data::Track::_insert_hook_after(MusicBrainz::Server::Data::Track=HASH(0x5621833d6090), ARRAY(0x562179282438), HASH(0x56218befd440)) called at lib/MusicBrainz/Server/Data/CoreEntity.pm line 101 MusicBrainz::Server::Data::CoreEntity::insert(MusicBrainz::Server::Data::Track=HASH(0x5621833d6090), HASH(0x56218bf067a0), HASH(0x56218b707ce8), HASH(0x56218b708330), HASH(0x56218b708678), HASH(0x56218befd278)) called at lib/MusicBrainz/Server/Data/Medium.pm line 153 MusicBrainz::Server::Data::Medium::insert(MusicBrainz::Server::Data::Medium=HASH(0x562182f039d8), HASH(0x56218bb1de00)) called at lib/MusicBrainz/Server/Edit/Generic/Create.pm line 50 MusicBrainz::Server::Edit::Generic::Create::insert(MusicBrainz::Server::Edit::Medium::Create=HASH(0x56218bcdc038)) called at lib/MusicBrainz/Server/Data/Edit.pm line 576 MusicBrainz::Server::Data::Edit::create(MusicBrainz::Server::Data::Edit=HASH(0x5621822d14b0), "name", "", "release", MusicBrainz::Server::Entity::Release=HASH(0x5621879168c8), "format_id", 12, "position", ...) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 599 MusicBrainz::Server::Controller::WS::js::Edit::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(0x562187bb0e88), Try::Tiny::Catch=REF(0x562187bf5a40)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 617 MusicBrainz::Server::Controller::WS::js::Edit::create_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98), HASH(0x562187be60f0)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 679 MusicBrainz::Server::Controller::WS::js::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(0x56218791a608), Try::Tiny::Catch=REF(0x5621876a75c0)) called at lib/Sql.pm line 335 Sql::_auto_transaction(CODE(0x56218752f228), Sql=HASH(0x5621867176a8)) called at lib/Sql.pm line 340 Sql::_run_in_transaction_one(CODE(0x56218752f228), Sql=HASH(0x5621867176a8)) called at lib/Sql.pm line 355 Sql::run_in_transaction(CODE(0x56218752f228), Sql=HASH(0x5621867176a8)) called at lib/MusicBrainz/Server/Model/MB.pm line 19 MusicBrainz::Server::Model::MB::with_transaction(MusicBrainz::Server::Model::MB=HASH(0x562181acb858), CODE(0x56218752f228)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 690 MusicBrainz::Server::Controller::WS::js::Edit::submit_edits(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98), HASH(0x562187be60f0)) called at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 649 MusicBrainz::Server::Controller::WS::js::Edit::create(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x562184313230), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x562184313230)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x562184313230)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x562184313230), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/ActionChain.pm line 46 Catalyst::ActionChain::dispatch(Catalyst::ActionChain=HASH(0x562187bc4c90), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 170 Catalyst::Controller::_ACTION(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x56218430e3d0), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x56218430e3d0)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x56218430e3d0)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x56218430e3d0), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x562177188d80), "forward", MusicBrainz::Server=HASH(0x56218688ad98), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x562177188d80), MusicBrainz::Server=HASH(0x56218688ad98), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x56218688ad98), "_ACTION") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Controller.pm line 134 Catalyst::Controller::_DISPATCH(MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 358 Catalyst::Action::execute(Catalyst::Action=HASH(0x56218430e010), MusicBrainz::Server::Controller::WS::js::Edit=HASH(0x562183e14050), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 eval {...} called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2060 Catalyst::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x56218430e010)) called at lib/Catalyst/Plugin/ErrorInfo.pm line 34 Catalyst::Plugin::ErrorInfo::execute(MusicBrainz::Server=HASH(0x56218688ad98), "MusicBrainz::Server::Controller::WS::js::Edit", Catalyst::Action=HASH(0x56218430e010)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Action.pm line 353 Catalyst::Action::dispatch(Catalyst::Action=HASH(0x56218430e010), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 261 Catalyst::Dispatcher::_do_forward(Catalyst::Dispatcher=HASH(0x562177188d80), "forward", MusicBrainz::Server=HASH(0x56218688ad98), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 241 Catalyst::Dispatcher::forward(Catalyst::Dispatcher=HASH(0x562177188d80), MusicBrainz::Server=HASH(0x56218688ad98), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 482 Catalyst::forward(MusicBrainz::Server=HASH(0x56218688ad98), "/ws/js/edit/_DISPATCH") called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Dispatcher.pm line 107 Catalyst::Dispatcher::dispatch(Catalyst::Dispatcher=HASH(0x562177188d80), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2006 Catalyst::dispatch(MusicBrainz::Server=HASH(0x56218688ad98)) called at lib/MusicBrainz/Server.pm line 389 MusicBrainz::Server::__ANON__() called at lib/MusicBrainz/Server.pm line 354 MusicBrainz::Server::with_translations(MusicBrainz::Server=HASH(0x56218688ad98), CODE(0x562187b6bac0)) called at lib/MusicBrainz/Server.pm line 390 Class::MOP::Class:::around(CODE(0x562172e7b258), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x56218688ad98)) called at lib/MusicBrainz/Server.pm line 404 Class::MOP::Class:::around(CODE(0x56218438dad0), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x56218688ad98)) called at lib/MusicBrainz/Server.pm line 489 Class::MOP::Class:::around(CODE(0x562183e800c0), MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 166 Class::MOP::Method::Wrapped::__ANON__(MusicBrainz::Server=HASH(0x56218688ad98)) 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(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 97 MusicBrainz::Server::dispatch(MusicBrainz::Server=HASH(0x56218688ad98)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2412 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(0x562187936028), Try::Tiny::Catch=REF(0x562187bd60b8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst.pm line 2421 Catalyst::handle_request("MusicBrainz::Server", "env", HASH(0x56218754fd10), "response_cb", CODE(0x562187886bd8)) called at /home/musicbrainz/carton-local/lib/perl5/Catalyst/Engine.pm line 807 Catalyst::Engine::__ANON__(CODE(0x562187886bd8)) 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(0x562187966d30), Try::Tiny::Catch=REF(0x562187839778)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Middleware/HTTPExceptions.pm line 41 Plack::Middleware::HTTPExceptions::__ANON__(CODE(0x562187953880)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x56218776ed50)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x562187c71010)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x562187be6108)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Util.pm line 339 Plack::Util::__ANON__(CODE(0x562187842cb8)) called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 377 Starlet::Server::handle_connection(Plack::Handler::Starlet=HASH(0x56218437c4c8), HASH(0x56218754fd10), IO::Socket::INET=GLOB(0x562187b8eaa0), CODE(0x5621843a7c68), "", "", "") called at /home/musicbrainz/carton-local/lib/perl5/Starlet/Server.pm line 190 Starlet::Server::accept_loop(Plack::Handler::Starlet=HASH(0x56218437c4c8), CODE(0x5621843a7c68), 86) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Handler/Starlet.pm line 80 Plack::Handler::Starlet::run(Plack::Handler::Starlet=HASH(0x56218437c4c8), CODE(0x5621843a7c68)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Loader.pm line 84 Plack::Loader::run(Plack::Loader=HASH(0x562170af7398), Plack::Handler::Starlet=HASH(0x56218437c4c8)) called at /home/musicbrainz/carton-local/lib/perl5/Plack/Runner.pm line 279 Plack::Runner::run(Plack::Runner=HASH(0x562170854db0)) called at /home/musicbrainz/carton-local/bin/plackup line 7
      

      Server IP: 138.201.227.205
      Date: Sat, 16 Apr 2022 16:07:23 GMT

            bitmap Michael Wiencek
            chaban chaban
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package