The function srv_do_purge() is invoking service_manager_extend_timeout() without any rate limit, wasting CPU in both the MariaDB server and systemd.
The call would only make sense during a slow shutdown SET GLOBAL innodb_fast_shutdown=0. Even then, it would make sense to rate-limit the output, and write an accumulated count only every N seconds. The purpose of the call is to prevent systemd from killing the server due to seeming hang, and to inform the user about the progress. It would be even more useful if there was an indication of work that remains to be done.
Also other calls to service_manager_extend_timeout() should be appropriately rate-limited and possibly disabled outside startup or shutdown.
danblack, as the contributor of MDEV-14705, do you know the default timeout before any EXTEND_TIMEOUT_USEC message was sent to systemd?
{"report":{"fcp":782,"ttfb":171.39999985694885,"pageVisibility":"visible","entityId":69237,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"9077d668-679d-46ec-bf4e-f1256c6e4fca","navigationType":0,"readyForUser":911.5999999046326,"redirectCount":0,"resourceLoadedEnd":854.2000000476837,"resourceLoadedStart":176.70000004768372,"resourceTiming":[{"duration":139.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":176.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":176.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":316.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":139.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":177,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":177,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":316.89999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":149,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":177,"connectEnd":177,"connectStart":177,"domainLookupEnd":177,"domainLookupStart":177,"fetchStart":177,"redirectEnd":0,"redirectStart":0,"requestStart":177,"responseEnd":326,"responseStart":326,"secureConnectionStart":177},{"duration":215.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":177.29999995231628,"connectEnd":177.29999995231628,"connectStart":177.29999995231628,"domainLookupEnd":177.29999995231628,"domainLookupStart":177.29999995231628,"fetchStart":177.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":177.29999995231628,"responseEnd":393,"responseStart":393,"secureConnectionStart":177.29999995231628},{"duration":219.39999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":177.5,"connectEnd":177.5,"connectStart":177.5,"domainLookupEnd":177.5,"domainLookupStart":177.5,"fetchStart":177.5,"redirectEnd":0,"redirectStart":0,"requestStart":177.5,"responseEnd":396.89999985694885,"responseStart":396.89999985694885,"secureConnectionStart":177.5},{"duration":219.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":177.59999990463257,"connectEnd":177.59999990463257,"connectStart":177.59999990463257,"domainLookupEnd":177.59999990463257,"domainLookupStart":177.59999990463257,"fetchStart":177.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":177.59999990463257,"responseEnd":397.2999999523163,"responseStart":397.2999999523163,"secureConnectionStart":177.59999990463257},{"duration":219.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":177.89999985694885,"connectEnd":177.89999985694885,"connectStart":177.89999985694885,"domainLookupEnd":177.89999985694885,"domainLookupStart":177.89999985694885,"fetchStart":177.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":177.89999985694885,"responseEnd":397.7000000476837,"responseStart":397.7000000476837,"secureConnectionStart":177.89999985694885},{"duration":291.39999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":178,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":178,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":469.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":220,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":178.20000004768372,"connectEnd":178.20000004768372,"connectStart":178.20000004768372,"domainLookupEnd":178.20000004768372,"domainLookupStart":178.20000004768372,"fetchStart":178.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":178.20000004768372,"responseEnd":398.2000000476837,"responseStart":398.09999990463257,"secureConnectionStart":178.20000004768372},{"duration":291.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":178.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":178.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":469.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":220.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":178.5,"connectEnd":178.5,"connectStart":178.5,"domainLookupEnd":178.5,"domainLookupStart":178.5,"fetchStart":178.5,"redirectEnd":0,"redirectStart":0,"requestStart":178.5,"responseEnd":398.59999990463257,"responseStart":398.59999990463257,"secureConnectionStart":178.5},{"duration":586.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":184.09999990463257,"connectEnd":184.09999990463257,"connectStart":184.09999990463257,"domainLookupEnd":184.09999990463257,"domainLookupStart":184.09999990463257,"fetchStart":184.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":184.09999990463257,"responseEnd":770.8999998569489,"responseStart":770.8999998569489,"secureConnectionStart":184.09999990463257},{"duration":605,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":184.20000004768372,"connectEnd":184.20000004768372,"connectStart":184.20000004768372,"domainLookupEnd":184.20000004768372,"domainLookupStart":184.20000004768372,"fetchStart":184.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":184.20000004768372,"responseEnd":789.2000000476837,"responseStart":789.2000000476837,"secureConnectionStart":184.20000004768372},{"duration":289.90000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":481.2999999523163,"connectEnd":481.2999999523163,"connectStart":481.2999999523163,"domainLookupEnd":481.2999999523163,"domainLookupStart":481.2999999523163,"fetchStart":481.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":481.2999999523163,"responseEnd":771.2000000476837,"responseStart":771.2000000476837,"secureConnectionStart":481.2999999523163},{"duration":167.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":775.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":775.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":943.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":54.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":798.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":798.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":853,"responseStart":0,"secureConnectionStart":0},{"duration":46.200000047683716,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":799.8999998569489,"connectEnd":799.8999998569489,"connectStart":799.8999998569489,"domainLookupEnd":799.8999998569489,"domainLookupStart":799.8999998569489,"fetchStart":799.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":799.8999998569489,"responseEnd":846.0999999046326,"responseStart":846.0999999046326,"secureConnectionStart":799.8999998569489},{"duration":53.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":800.3999998569489,"connectEnd":800.3999998569489,"connectStart":800.3999998569489,"domainLookupEnd":800.3999998569489,"domainLookupStart":800.3999998569489,"fetchStart":800.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":800.3999998569489,"responseEnd":854.2000000476837,"responseStart":854.2000000476837,"secureConnectionStart":800.3999998569489}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":10,"responseStart":171,"responseEnd":179,"domLoading":175,"domInteractive":998,"domContentLoadedEventStart":998,"domContentLoadedEventEnd":1044,"domComplete":1161,"loadEventStart":1161,"loadEventEnd":1161,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":954.3999998569489},{"name":"bigPipe.sidebar-id.end","time":955.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":955.3999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":958.2000000476837},{"name":"activityTabFullyLoaded","time":1061.7000000476837}],"measures":[],"correlationId":"d78ea9d75a2f08","effectiveType":"4g","downlink":9.9,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":15,"dbConnsTimeInMs":23,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Default time out is https://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutStopSec= which falls back to https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#DefaultTimeoutStartSec= (90s).