Graham Dumpleton

@grahamdumpleton
80 Followers
48 Following
259 Posts
Aficionado in all things #kubernetes and containers. Long time #python user and author of the Apache/mod_wsgi and wrapt projects for Python.
GitHubhttps://github.com/GrahamDumpleton
Bloghttps://grahamdumpleton.me/
Claude also pegged the CPython test suite as only the second thing to heavily exercise sub-interpreters in Python. So mod_wsgi wins. 🥳
Well that was strange and has never happened to me before. Was asking Claude questions about Python sub-interpreters and it came back as saying Apache/mod_wsgi was heaviest user of sub-interpreters. I jokingly responded by saying "I wrote mod_wsgi". It then proceeded to ask me lots of questions about how various aspects of the internals of mod_wsgi worked and how things might change with free threading and per interpreter GIL (which I had not mentioned). If only it could learn and remember.
@davidism As a dev release on PyPi. Was looking at doing an RC release this afternoon, but if considering that, I should first add an extra page to docs on the topic. Docs on directives to configure it exist, but don't have a general page on free threading and per interpreter GIL which pulls it all together. Since the sprints are a few days away, I should have ample time to make sure my docs cover it adequately.
@davidism Hmmm, not sure that concerns about GC algorithm are right since seems free threaded Python does GC differently than when have GIL. So GC mechanism being reverted probably only applies to when GIL operating.
@davidism Confirmed segfault was in mod_wsgi and partly related to metrics collection it does, although not specifically GC metrics. Looks like it may though relate to delayed GC of objects. I was using Python 3.14.4t, which had the GC which got reverted in 3.14.5 so not sure if that contributed. The build I was running with wasn't latest mod_wsgi code though, so I need to make sure I am up to date and see I if can trigger it again.
@davidism FWIW, a Flask hello world app seems to work okay. With single process and 5 threads, over 30000 requests/sec, using about 4 cores (on a 4 performance 6 efficiency cores box). Seen one segfault, so I will need to investigate to see if that is a mod_wsgi issue. Possible that metrics collection mod_wsgi is doing could be blowing up on free threading. Recently add GC metrics and was nervous about whether that would be safe under free threading.
@davidism Sorry, no more PyCon US for me. 😭
Hey #pyconus, has there been much talk about Python free threading and per interpreter GIL support. I have added support for both in my mod_wsgi module for hosting Python WSGI applications under Apache/httpd. I am interested in connecting with anyone who may want to explore how these features can be used with WSGI applications in a production grade WSGI server setting. Or are these features still not seen as ready for prime time?
Wow. Data from the incremental GC used in Python 3.13-3.14.4 looks so different.
First pass at trying to collect some real time stats on Python garbage collector behaviour. This is from a Flask web application hosted in mod_wsgi. Using Python 3.14.5 here, but now to see if I can trigger again the memory growth issue when using Python 3.14.4.