Title: "mkdocs serve" does not cleanup after a SIGTERM · Issue #3905 · mkdocs/mkdocs · GitHub
Open Graph Title: "mkdocs serve" does not cleanup after a SIGTERM · Issue #3905 · mkdocs/mkdocs
X Title: "mkdocs serve" does not cleanup after a SIGTERM · Issue #3905 · mkdocs/mkdocs
Description: It looks like mkdocs does not handle SIGTERM and leaves its temporary site_dir in the /tmp directory. These directories are never cleaned up. mkdocs should handle SIGTERM and/or cleanup leftover /tmp directories on startup. My setup I ru...
Open Graph Description: It looks like mkdocs does not handle SIGTERM and leaves its temporary site_dir in the /tmp directory. These directories are never cleaned up. mkdocs should handle SIGTERM and/or cleanup leftover /t...
X Description: It looks like mkdocs does not handle SIGTERM and leaves its temporary site_dir in the /tmp directory. These directories are never cleaned up. mkdocs should handle SIGTERM and/or cleanup leftover /t...
Opengraph URL: https://github.com/mkdocs/mkdocs/issues/3905
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"mkdocs serve\" does not cleanup after a SIGTERM","articleBody":"It looks like mkdocs does not handle SIGTERM and leaves its temporary site_dir in the /tmp directory. These directories are never cleaned up. mkdocs should handle SIGTERM and/or cleanup leftover /tmp directories on startup.\n\n#### My setup\nI run mkdocs inside a docker container [see the [mkdocs-material project](https://github.com/squidfunk/mkdocs-material)]. By default, the docker starts \"mkdocs serve\".\n\nThe issue occurs when the container is stopped. To stop a container, docker [sends SIGTERM](https://docs.docker.com/reference/cli/docker/container/stop/#description) to the main process and waits for the signal to be handled. In the case of mkdocs-material, the main process is tini, but tini already [forwards signals](https://github.com/krallin/tini/blob/master/src/tini.c#L526) to the child mkdocs process. To confirm the behaviour, I've also sent SIGTERM directly to mkdocs [eg. `kill -s TERM \u003cmkdocs-pid>`] and mkdocs still fails to clean up /tmp directories.\n","author":{"url":"https://github.com/toddke","@type":"Person","name":"toddke"},"datePublished":"2025-01-17T00:34:16Z","url":"https://github.com/mkdocs/mkdocs/issues/3905"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d6db79c2-cf53-78de-28e0-c9f40d7db4a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 85AE:24598E:17E061:1EECC6:6AEBEAA3 |
| html-safe-nonce | 66f1f356b699a2caf20d7b113c6671dd2afe7003f98039b86d4d954600c91a9f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NUFFOjI0NTk4RToxN0UwNjE6MUVFQ0M2OjZBRUJFQUEzIiwidmlzaXRvcl9pZCI6IjU3NjA4MDg1NjE4MzAyNTkzNjQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5ea9c8e64b06c5c5c349e2a6111fe43a2b1c7128cdfb04ea7afb4d62f2b35a97 |
| hovercard-subject-tag | issue:2794119023 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/mkdocs/mkdocs/3905/issue_layout |
| twitter:image | https://opengraph.githubassets.com/00c93d4ee0f60837999a7bdabba8d5b5315ab44a642d530e57e7862c6f5127ab/mkdocs/mkdocs/issues/3905 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/00c93d4ee0f60837999a7bdabba8d5b5315ab44a642d530e57e7862c6f5127ab/mkdocs/mkdocs/issues/3905 |
| og:image:alt | It looks like mkdocs does not handle SIGTERM and leaves its temporary site_dir in the /tmp directory. These directories are never cleaned up. mkdocs should handle SIGTERM and/or cleanup leftover /t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | toddke |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb4fe414357cc0dbc2996fde3e4947524ebbb7f50a92a6e6934fee909acf2c00 |
| turbo-cache-control | no-preview |
| go-import | github.com/mkdocs/mkdocs git https://github.com/mkdocs/mkdocs.git |
| octolytics-dimension-user_id | 9692741 |
| octolytics-dimension-user_login | mkdocs |
| octolytics-dimension-repository_id | 15830664 |
| octolytics-dimension-repository_nwo | mkdocs/mkdocs |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 15830664 |
| octolytics-dimension-repository_network_root_nwo | mkdocs/mkdocs |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5295beeefa36b9ce5c704f35fdc483ebb6f2cb19 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width