NabismoPrime on Nostr: Made some more progress in the memory leak investigation for the metadata updater. ...
Made some more progress in the memory leak investigation for the metadata updater. Apparently the process below is the culprit:
python3.12 -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=14, pipe_handle=16) --multiprocessing-fork
I fully expect that process to use a lot of memory while the script is running but it holds onto it after the run has finished. Oddly enough, the same exact script returns to sane memory levels immediately after runs when instrumented with a continuous profile.
Any Python folks out there have any ideas why this process won't let go of the memory if it isn't profiled? I've tried manual garbage collection in the script but it doesn't affect this at all.
#asknostr #python
Published at
2024-10-07 01:41:52Event JSON
{
"id": "863493a74be5a45b2c23a190671ebf54c3b24689a01776d1781ab4a028d306b5",
"pubkey": "4503baa127bdfd0b054384dc5ba82cb0e2a8367cbdb0629179f00db1a34caacc",
"created_at": 1728265312,
"kind": 1,
"tags": [
[
"t",
"asknostr"
],
[
"t",
"python"
],
[
"client",
"noStrudel",
"31990:266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5:1686066542546"
]
],
"content": "Made some more progress in the memory leak investigation for the metadata updater. Apparently the process below is the culprit:\n\npython3.12 -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=14, pipe_handle=16) --multiprocessing-fork \n\nI fully expect that process to use a lot of memory while the script is running but it holds onto it after the run has finished. Oddly enough, the same exact script returns to sane memory levels immediately after runs when instrumented with a continuous profile.\n\nAny Python folks out there have any ideas why this process won't let go of the memory if it isn't profiled? I've tried manual garbage collection in the script but it doesn't affect this at all.\n\n https://i.nostr.build/ot2uiO4OEDskcCDc.png \n\n#asknostr #python",
"sig": "ba0395166ad3baf77fd6334fd3d92217eb2add832f1b25cfa748fb2b2339bf3bc1f9b51a3f0e966643b42511a277c24e6277c13f0be8b5a8405826c2713a64db"
}