V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  Multicom  ›  全部回复第 1 页 / 共 1 页
回复总数  5
2021-06-20 18:23:24 +08:00
回复了 Multicom 创建的主题 Python aiohttp 并发请求被挂起
@onlyzdd 请问 Python 和 aiohttp 分别是什么版本?当前环境下一直存在该问题
```
root@host ~ # python3 -V
Python 3.7.3
root@host ~ # pip3 show aiohttp | grep Version
Version: 3.7.4.post0
root@host ~ # uname -a
Linux Debian-104-buster-64-minimal 5.12.10-xanmod1-cacule ...
```
2021-06-20 04:15:39 +08:00
回复了 Multicom 创建的主题 Python aiohttp 并发请求被挂起
@Kobayashi 经测试,httpbin.org 确实没有问题,但 yandex.ruwww.google.com 均存在不同数量的请求被挂起 120~240 秒
2021-06-18 20:56:34 +08:00
回复了 Multicom 创建的主题 Python ThreadPoolExecutor 奇怪的内存增长
@v2exblog 刚学所以不太了解,原来这是错误用法,受教了
2021-06-18 20:54:33 +08:00
回复了 Multicom 创建的主题 Python ThreadPoolExecutor 奇怪的内存增长
@ospider 将 requests.Session() 更换为 httpx.Client() ,内存占用降低,但仍持续增长
```
Line # Mem usage Increment Occurences Line Contents
============================================================
10 25.2 MiB 25.2 MiB 1 @profile
11 def test():
12 25.2 MiB 0.0 MiB 1 executor = ThreadPoolExecutor(max_workers = 100)
13 28.2 MiB 3.1 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
14 28.5 MiB 0.3 MiB 1 wait(task)
15 28.8 MiB 0.3 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
16 28.8 MiB 0.0 MiB 1 wait(task)
17 29.0 MiB 0.3 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
18 31.3 MiB 2.3 MiB 1 wait(task)
19 31.6 MiB 0.3 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
20 35.9 MiB 4.3 MiB 1 wait(task)
21 35.9 MiB 0.0 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
22 39.0 MiB 3.0 MiB 1 wait(task)
23 39.2 MiB 0.3 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
24 41.0 MiB 1.8 MiB 1 wait(task)
25 41.0 MiB 0.0 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
26 43.8 MiB 2.8 MiB 1 wait(task)
27 43.8 MiB 0.0 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
28 45.8 MiB 2.0 MiB 1 wait(task)
29 45.8 MiB 0.0 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
30 48.1 MiB 2.3 MiB 1 wait(task)
31 48.1 MiB 0.0 MiB 503 task = [executor.submit(get, (i)) for i in range(500)]
32 49.4 MiB 1.3 MiB 1 wait(task)
33 49.4 MiB 0.0 MiB 1 s.close()
```
2021-06-16 07:39:17 +08:00
回复了 Multicom 创建的主题 问与答 RAR 多线程在压缩级别 0 时失效
@kokutou
1 RAR5 和 RAR6 都是如此,应该不属于 BUG
2 因为使用-hp 选项进行加密,所以不压缩时写入受限于加密速度
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5309 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 07:13 · PVG 15:13 · LAX 00:13 · JFK 03:13
Developed with CodeLauncher
♥ Do have faith in what you're doing.