Correction: terminating MySQL isn’t actually the slow part, it just happens to be the last message printed before the container exits, and it’s the container exit/cleanup that’s actually slow. T265615#6586508
Original task description:
I’ve noticed that the “Terminating MySQL” step at the end of a CI build can take several minutes. For example, in this recent job:
14:42:01 INFO:quibble.commands:Shutting down backends: <php DevWebServer http://127.0.0.1:9412 /workspace/src> <Xvfb :94> <ChromeWebDriver :94> 14:42:01 INFO:backend.ChromeWebDriver:Terminating ChromeWebDriver 14:42:01 INFO:backend.Xvfb:Terminating Xvfb 14:42:01 INFO:backend.DevWebServer:Terminating DevWebServer 14:42:01 INFO:quibble.commands:Shutting down backends: <mysql /workspace/db/quibble-mysql-ub2yb_5l/socket> 14:42:01 INFO:backend.MySQL:Terminating MySQL 14:46:16 [wmf-quibble-selenium-php72-docker@2] $ /bin/bash -xe /tmp/jenkins6976447998931934422.sh
I have no idea what Quibble or MySQL were doing there, but I doubt that it was really worth four minutes(!) of CI time.
So far, I’ve only noticed this in Wikibase jobs, but that might just be because I don’t often look at the CI output for other repositories.