简体   繁体   English

具有超过 1k 个并发 tcp 请求的 amphp 问题

[英]Problems with amphp with more than 1k concurrent tcp requests

I have created an application using the https://amphp.org framework.我使用https://amphp.org框架创建了一个应用程序。 It is running with the help of a cronjob (every 5 minutes) sending a concurrent request to some sensors (temperatures) and it saves all the responses.它在 cronjob(每 5 分钟)的帮助下运行,向某些传感器(温度)发送并发请求,并保存所有响应。

Up to ~1K sensors everything is working fine.多达约 1K 传感器一切正常。

When increased to 1.5k for about 30% of the requests I am getting the following message:当大约 30% 的请求增加到 1.5k 时,我收到以下消息:

Connecting to tcp:// .连接到 tcp:// . . . . :502 failed: timeout exceeded (10000 ms) :502 失败:超时(10000 毫秒)

Any suggestions would be greatly appreciated!任何建议将不胜感激!

There's usually a limit of up to 1024 file descriptors with stream_select , so you'll need one of the extensions, see https://github.com/amphp/amp#requirements . stream_select通常最多有 1024 个文件描述符的限制,因此您需要其中一个扩展,请参阅https://github.com/amphp/amp#requirements

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM