Jump to content

ESET high cpu usage with Apache Php websocket server

Recommended Posts

Hi to the community,

I have a XAMPP with Apache/Php server runing in a windows PC (everything works very well). The PC is protected with ESET Internet Security.

I'm trying to do a web application for my students in my classroom to connect their tablet or phone with this PC using websocket protocol.

   _ Tablets on Client side (javascript):
         ws = ws://host:port/ws/;
        socket = new WebSocket(ws);
        + some code to exchange little message with server (less than 300 octet each)

   _ PC on Server side:  use php.exe (CLI) to run a simple php socket stream server
     (code taken from:  https://github.com/ghedipunk/PHP-Websockets )

       The structure of the code is a basic php socket creation with an infinite while loop to manage connections and messages:

       $master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
       socket_bind($master, $addr, $port);
       while(true) {
           tick(); //send a message to all connected user each second
           //wait message or connection from users, blocking while loop for 1 second
           foreach ($read as $socket) {
               if ($socket == $master) {
                   ... //connect new users
               else {
                  ... // respond to messages send by users
The app works well if a few tablets are connected, but if all the students are connected (about 30), Eset "ekrn.exe" CPU usage became very high and slow down completely the php server (ekrn 50% cpu and php.exe use the other 50%), so the PC is lagging a lot and most client/server messages are not send/received.
If I stop ESET protection, the server then refunction normally and we can use the web-app.

Does someone have experience of php socket that could explain why ESET protection (usualy very quiet and discreet) has suddenly very high cpu usage when using websocket messages (send at low frequency, about 1 second for each client device) between the PC where is installed ESET and about 30 tablets/phones.

Is there some ESET parameters to tell ESET kernel that those websocket communications are legitimate and not to check them for example ?

Thank you for any help.

Edited by yedisha
Link to comment
Share on other sites

  • Administrators

Since this is a very specific programming question, please open a support ticket with your local ESET distributor so that developers can provide a standpoint on this.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...