PHP closing connections when too many

170 views Asked by At

recently, I decided to load test my website on some page that require server sent events (event streams) which means that PHP needs to handle many opened connections (with scripts on loop). When approaching the ~140 opened connection, the connections started closing after 1 or 2 seconds. While doing the load testing I monitored my server and the CPU load was very low, RAM usage was low, Network was not the bottleneck so I know think that it may not be an hardware deficiency. Apache log showed no PHP warnings (neither fatal errors). Is there a parameter in the php ini file that may be responsable for closing connections?

If you need some logs or other I will try my best to provide them.

Thanks.

0

There are 0 answers