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);
       socket_listen($master,30)
   
       while(true) {
       
           tick(); //send a message to all connected user each second
     
           //wait message or connection from users, blocking while loop for 1 second
           socket_select($read,$write,$except,1);
     
           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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

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