使用的GatewayWorker框架,
目前碰到的情况是BusinessWorker进程跑一段时间后,内存一直在上涨,得定期重启BusinessWorker进程,
客户端使用WebSocket长连接,目前客户端在2500左右,基本上7 x 24时在线(硬件),
Worker进程情况如图1:

Events没有复杂的逻辑,基本上只是在维持心跳:
```php
class Events
{
public static function onConnect($client_id)
{
//echo $client_id . "\n";
Gateway::sendToCurrentClient(json_encode());
}
public static function onMessage($client_id, $message)
{
//file_put_contents('./debug.log', $client_id.':'.$message."\n", FILE_APPEND);
$recArrData = json_decode($message, true);
if (json_last_error() === JSON_ERROR_NONE)
{
if (isset($recArrData))
{
switch ($recArrData)
{
case 'pingBack':
return Gateway::sendToCurrentClient(json_encode());
}
}
}
}
public static function onClose($client_id)
{
self::offlineNotice('http://xxxxxxx/close/'. $client_id);
}
public static function offlineNotice($url)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT_MS, 300);
curl_setopt($ch, CURLOPT_NOSIGNAL, 1);
curl_exec($ch);
curl_close($ch);
unset($ch);
}
}
```
请问是什么原因或有木有排查思路?谢谢