DrupalChat module polling method
I had a experience about that, when using Ajax each short time each user and all of open each pages has requested to server ( if you look at firebug console you see what I mean ), another method is Long Polling method that also it is not the best way ( although it is better than Ajax method if very quick response time is not important for you), In Both cause heavy load on server (especially memory exhausted).ajax and polling is old method to interactive real time applications like chat
I strongly recommend you using Nodejs method, Nodejs is very good for realtime chat system

So use  Drupalchat nodejs integration solution 


  f you use node.js as backend in this module, then it will be highly
  scalable. There are two ways to use this backend:

 First way is to setup your own node.js server and install Nodejs Integration module. This is currently under development.
If you don't want to or can't setup your own node.js server, then you can checkout our ready to use node.js server. If you opt for this

  
  method, then there is no need to install any additional
  software/package on your web server. To do so, please visit us at
  https://iflychat.com.


another solution is using nodejs_chat drupal module ( in both solution you require nodejs on yourserver).