Comments (11)
中间登录过后,基本上就没有任何操作了
from wxpy.
麻烦确认下环境中安装的 itchat 版本号
import itchat
print(itchat.__version__)
from wxpy.
目前用的最新版本,0.39 ,但是在 centos7 下,每发一条消息,就会增长一点,我是发一个图片和一条文本消息,每次会增长400K 左右内存
from wxpy.
你好,我先前发现,与 itchat
(wxpy 依赖) 1.3 + 版本搭配使用时,会有比较明显的内存泄露问题,所以目前 wxpy 在 requirement 里指定的 itchat 版本为 itchat 1.2 的最后一个稳定版本。如果使用 pip
,会自动安装匹配的版本。能否知道下你现在环境中的 itchat
版本号?
from wxpy.
我是用的 pip安装的,版本是 1.2.32
from wxpy.
是不是每个微信号里都有很多群,且每个群都有很多人?
“内存从开始的 110M,逐渐增长到 230M” 这个过程前后间隔多久?
能不能介绍下这些微信号的规模?
我也帖下我的情况,来自 “wxpy 机器人” 群主机器人
心跳包中的4个字段分别表示 发送时间、在线时间、内存占用、收到和发出的消息数量
刚启动不久,前期内存增长比较快
[now] 09:30:54
[uptime] 0:00:21
[memory] 36.87 MB
[messages] 1
启动 30 分钟后,30 分钟增长了 9 MB,确实很快
[now] 10:01:14
[uptime] 0:30:41
[memory] 45.27 MB
[messages] 53
接下来的20分钟内,新增 26 条消息,但没有内存增长
[now] 10:21:39
[uptime] 0:51:05
[memory] 45.27 MB
[messages] 79
最近一次心跳,又过了8小时,新增 749 条消息,仅增加 9.46 MB 内存
[now] 18:32:20
[uptime] 9:01:46
[memory] 54.73 MB
[messages] 828
补充下,以上的数据并没有限制“最大历史消息数量”。
而且同个进程内还有一个简陋的 Flask 服务。
from wxpy.
@teli5200 如果确实群消息非常多,可以考虑设置下最大历史消息保存数量
http://wxpy.readthedocs.io/zh/latest/messages.html#wxpy.Messages.max_history
bot.messages.max_history = 100
自己查了下源码,暂时无法通过设为 0 来关闭记录,算是 BUG [囧]
不过可以先设个小一点数目,1 也可以。
from wxpy.
好的,我来继续跟踪下,有问题跟你反映,谢谢
from wxpy.
我也是换成flask了,之前用 dj 内存增长更加厉害 ,另外还有个问题 ,有个微信号,有5000个好友,这个号登上去需要花费时间非常多,而且会消耗约 50M左右的内存,上去后过会会掉线,其他好友少的微信正常
刚好在这里一起说个问题,比如用家庭宽带挂微信的话,隔10几个小时之后发消息会出现返回 1100 错误,初步判断是因为家庭宽带电信限制了在线时间导致重新拨号引起,就是说链路换了,这种错误能否检测到,并且重新登录上去
from wxpy.
bot.messages.max_history = 1 这个设置后内存占用减少了一半多,但是还是会缓慢增长
from wxpy.
@teli5200 线上版本已支持通过设置 bot.messages.max_history = 0
来关闭消息记录功能
1100~1102 错误似乎与登陆状态之类的有关,包括 IP 变更等,使用固定 IP 的服务器可能会好一些。
from wxpy.
Related Issues (20)
- 完全沒有辦法給自己發訊息,求救
- 我尝试微信群同步信息的功能,但是图片和视频有时同步不成功,有没有办法。 HOT 1
- 微信群同步文本视频图片信息,但是信息顺序错乱,有没有办法。 HOT 1
- 基于pc微信做吗?
- 微信群接收一条消息后怎样暂停接收该微信群的其他消息,等处理完后重新开启对该微信群的消息接收 HOT 1
- 无法接受到群消息
- 互助讨论群 HOT 1
- 不到一天就退出登录了,要怎么办 HOT 6
- wxpy 在python3.8下出错。 HOT 3
- Cannot auto reply with @bot.register()
- 【研发必看!!!】做机器人,小助手,营销系统,客服系统,监管系统的可以 看下这个API方案 https://www.wkteam.cn/ HOT 1
- Support for ItChat 1.3+
- 是不是不能用了? HOT 4
- send_video 为什么报错raise ResponseError(err_code=err_code, err_msg=err_msg)
- 【研发必看!!!】做机器人,小助手,营销系统,客服系统,监管系统的可以 看下这个API方案 https://www.wkteam.cn/
- 微信扫码后出现,“KeyError:pass_ticket"
- 散了吧,微信已屏蔽 HOT 3
- 【研发必看!!!】做机器人,小助手,营销系统,客服系统,监管系统的可以 看下这个API方案 https://www.wkteam.cn/ #458
- 曝光一个是骗子~大家小心!!!【往事随风】【绝版先生】 HOT 2
- 现在能用什么办法监控到微信群消息吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wxpy.