webman/redis-queue 1.3.2
我操作大表 ,導(dǎo)致所有隊列進程busy, mysql阻塞寫入,我理解
但索引添加完成, busy消失,但是內(nèi)存超了 ,我設(shè)置了512M還是超了
出現(xiàn)
2024-07-01 22:46:50 pid:30566 Worker[30566] process terminated with ERROR: E_ERROR "Allowed memory size of 536870912 bytes exhausted (tried to allocate 8454040 bytes) in /www/wwwroot/webman/vendor/workerman/workerman/Connection/TcpConnection.php on line 593"
2024-07-01 22:46:50 pid:30532 worker[plugin.webman.redis-queue.consumer:30566] exit with status 11
2024-07-01 22:46:54 pid:30564 Worker[30564] process terminated with ERROR: E_ERROR "Allowed memory size of 536870912 bytes exhausted (tried to allocate 8454040 bytes) in /www/wwwroot/webman/vendor/workerman/workerman/Connection/TcpConnection.php on line 593"
2024-07-01 22:46:54 pid:30532 worker[plugin.webman.redis-queue.consumer:30564] exit with status 11
2024-07-01 22:46:54 pid:30563 Worker[30563] process terminated with ERROR: E_ERROR "Allowed memory size of 536870912 bytes exhausted (tried to allocate 36864 bytes) in /www/wwwroot/webman/vendor/workerman/redis/src/Protocols/Redis.php on line 166"
2024-07-01 22:46:54 pid:30532 worker[plugin.webman.redis-queue.consumer:30563] exit with status 11
我現(xiàn)在把所有延時隊列 全部改成及時消費,目前cpu和內(nèi)存都正常了
如果單條數(shù)據(jù)量大,我建議非必要不要用延時隊列
linux 還是 windows 系統(tǒng)? 這種情況不應(yīng)該的還是代碼有問題 我們也用過 沒出現(xiàn)任何問題 linux系統(tǒng) 靜態(tài)php部署的呢
應(yīng)該是還沒到消費這部 看報錯信息 是框架內(nèi)部
<?php
public function consume($data)
{
try {
ZmqLog::create($data);
} catch (\Throwable $ex) {
}
}
沒遇到 這種情況 我們消費的數(shù)據(jù)比你們要打多了 我們是一次發(fā)送上百萬手機號碼 也是用的隊列 ,沒遇到過內(nèi)存泄漏問題 漲到一定程度就不增長了 內(nèi)存使用
你們是延時隊列嗎 我覺得應(yīng)該是 https://github.com/webman-php/redis-queue/issues/2 由于我單條數(shù)據(jù)大大于2m,
導(dǎo)致 這部一下子取得128條 ,導(dǎo)致內(nèi)存爆了
為啥你一個數(shù)據(jù)能2M 這么大 ???按道理 不應(yīng)這么大的呀 群主一次取128就是怕內(nèi)存爆掉,但是沒想到你一個數(shù)據(jù)都2M 多