This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients Valentin.Lorentz, methane, pitrou, progval, tacocat, vstinner
Date 2017-01-22.05:35:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@ProgVal, could you try following?
I doubt that this difference just shows rlimit behavior, not memory usage.

$ cat 
import sys
import queue
import multiprocessing
from urllib.request import Request, urlopen
import resource
import tracemalloc

def fetch():
    url = ''
    request = Request(url)
    fd = urlopen(request)
    return 'ok'


$ /usr/bin/time python3 
(0, 0)
0.12user 0.01system 0:01.47elapsed 9%CPU (0avgtext+0avgdata 18372maxresident)k
0inputs+0outputs (0major+2639minor)pagefaults 0swaps

$ PYTHONTRACEMALLOC=1 /usr/bin/time python3 
(6072093, 6140554)
0.22user 0.01system 0:01.52elapsed 15%CPU (0avgtext+0avgdata 22640maxresident)k
0inputs+0outputs (0major+3942minor)pagefaults 0swaps
Date User Action Args
2017-01-22 05:35:53methanesetrecipients: + methane, pitrou, vstinner, progval, Valentin.Lorentz, tacocat
2017-01-22 05:35:53methanesetmessageid: <>
2017-01-22 05:35:53methanelinkissue28663 messages
2017-01-22 05:35:52methanecreate