From 2ab085f911b9adccfb2faa02b5906a18318b8dc7 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 18 Nov 2025 14:46:28 +0100 Subject: [PATCH 1/2] feat(python): Update troubleshooting tip on multiprocessing --- docs/platforms/python/troubleshooting.mdx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/platforms/python/troubleshooting.mdx b/docs/platforms/python/troubleshooting.mdx index ace082a2ccd718..01e91f3f433cdc 100644 --- a/docs/platforms/python/troubleshooting.mdx +++ b/docs/platforms/python/troubleshooting.mdx @@ -138,9 +138,9 @@ If you need more fine-grained control over the behavior of the socket, check out socket-options. - + -If you're on Python version 3.12 or greater, you might see the following deprecation warning on Linux environments since the SDK spawns several threads. +If you're on Python version 3.12 or 3.13, you might see the following deprecation warning on Linux environments since the SDK spawns several threads. ``` DeprecationWarning: This process is multi-threaded, use of fork() may lead to deadlocks in the child. @@ -157,10 +157,13 @@ import concurrent.futures sentry_sdk.init() if __name__ == "__main__": - multiprocessing.set_start_method("spawn") + multiprocessing.set_start_method("spawn") # or "forkserver" pool = concurrent.futures.ProcessPoolExecutor() pool.submit(sentry_sdk.capture_message, "world") ``` + +`fork` was the default start method on POSIX platforms on Python 3.13 and lower. In Python 3.14, the default start method on POSIX platforms was changed to `forkserver`. On Windows and macOS the default is `spawn`. + From 92af1e35a714529c3e5351daa47715f554f8a1ee Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Tue, 18 Nov 2025 14:49:37 +0100 Subject: [PATCH 2/2] switch method around --- docs/platforms/python/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/python/troubleshooting.mdx b/docs/platforms/python/troubleshooting.mdx index 01e91f3f433cdc..76cb2200ab1731 100644 --- a/docs/platforms/python/troubleshooting.mdx +++ b/docs/platforms/python/troubleshooting.mdx @@ -157,7 +157,7 @@ import concurrent.futures sentry_sdk.init() if __name__ == "__main__": - multiprocessing.set_start_method("spawn") # or "forkserver" + multiprocessing.set_start_method("forkserver") # or "spawn" pool = concurrent.futures.ProcessPoolExecutor() pool.submit(sentry_sdk.capture_message, "world") ```