WebSocket hanging with 100% CPU usage

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yuri
    EspoCRM product developer
    • Mar 2014
    • 9324

    #1

    WebSocket hanging with 100% CPU usage

    If there are many connections, the WebSocket process can hang with 100% CPU usage. It happens because by default ReactPHP instantiates the event loop that uses file descriptors. Usually, the max number of file descriptors per process is relatively low (commonly 1024).

    To fix the problem, you need to install ev PHP extension. With the extension installed, ReactPHP will instantiate another event loop implementation.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.
Working...