My company wrote an application server that works as a long running service. We were confronted with a memory usage that we couldn't explain until we found out, that the re module is caching a lot of data in the background.
1 | re.purge()
|
The function re.purge() empties the internal cache of the re module. This will help to get some memory back in long running processes ;-)
Tags: debugging
nice! sre docs suck, thanks for this one :)