Comments (7)
请描述问题,光贴日志看不懂
from tdengine-restful-connector.
$i = 0;
while (true) {
if ($i >= 2000) {
break;
}
foreach ($node_log_groups as $node_log_group) {
$i ++;
$node_id = $node_log_group['node_id'];
go(function () use ($node_id, $start_time, $end_time) {
$service = new CreateAlert2($node_id, $start_time, $end_time);
$service->handle();
});
}
}
class CreateAlert2
{
public string|int $node_id;
public string|int $start_time;
public string|int $end_time;
public function __construct($node_id, $start_time, $end_time)
{
$this->node_id = $node_id;
$this->start_time = $start_time;
$this->end_time = $end_time;
}
public function handle(): void
{
$sql = "select ts, current from node.log where ts >= '{$this->start_time}' and ts < '{$this->end_time}' and node_id = {$this->node_id}";
$node_log_list = TDEngineOrm::getClientHandler()->query($sql)->getData();
}
}
一次并发2000个协程请求,就会出现这个问题 @Yurunsoft
from tdengine-restful-connector.
/**
* @param \Yurun\Util\YurunHttp\Pool\Config\PoolConfig $config
*/
public function __construct($config)
{
parent::__construct($config);
$this->channel = new Channel(1024);
}
是因为这里限制了1024,所以最大只能并发1024个么
from tdengine-restful-connector.
试试连接配置的 keepAlive
设为 false
from tdengine-restful-connector.
发了个 v1.0.4 版本,问题解决,不用修改配置了
from tdengine-restful-connector.
发了个 v1.0.4 版本,问题解决,不用修改配置了
好的,我去试试
from tdengine-restful-connector.
没有问题了
from tdengine-restful-connector.
Related Issues (7)
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 tdengine-restful-connector.