简体   繁体   中英

Problems with amphp with more than 1k concurrent tcp requests

I have created an application using the https://amphp.org framework. 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.

Up to ~1K sensors everything is working fine.

When increased to 1.5k for about 30% of the requests I am getting the following message:

Connecting to tcp:// . . . :502 failed: timeout exceeded (10000 ms)

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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