mChat

Low performance causing webhost to forcibly disable mChat - mChat

Low performance causing webhost to forcibly disable mChat

by rahlzel » Sat Mar 25, 2017 1:41 am

@kasimi

I'm using NFOserver's Lite plan, and twice now they have disabled mChat by editing my .htaccess script to stop it from refreshing due to it causing too high of a load.

About 3 months ago I was told that the script (mChat) was disabled because it was causing performance issues on other servers (shared hosting). I increased the refresh interval from 10 seconds to 30 seconds as requested.

Today, I received this:
Investigating high load on the machine hosting your website, we again noticed a refreshing chat script of some sort that you are using. This script seems to be very intensive and is both causing the high load and making you reach your allowed number of connections.

We have added a rule to prevent the URL from loading while you resolve this.
When I explained I had already increased the refresh interval to 30 seconds, this was the response:
30 seconds is a generalization that should allow for more intensive scripts to run without causing problems. Unfortunately your broken script is still causing problems, even when refreshing every 30 seconds. You'll need to remove the script or fix it. We cannot have this broken script running and causing problems for others on the machine.
Here are my current settings. Is this something I'm able to fix by simply changing a setting? I might need to stop using mChat because of this performance problem.
rahlzel
Registered User
Posts: 19
Joined: Thu Aug 26, 2010 4:51 am

Re: Low performance causing webhost to forcibly disable mCha

by kasimi » Sun Mar 26, 2017 9:59 pm

How many users do you have in total? How many are actively chatting, on average?

Here are some suggestions, more or less sorted by impact on performance, from high to low.
  • Session timeout. You've set it to 0 which means that users leaving the chat open will keep sending requests to your server forever. Set it to 600-1800 seconds (10-30 minutes) so that users who are not actively chatting don't use up resources.
  • Refresh interval. 30 seconds is already pretty high, I wouldn't increase it anymore for now.
  • Live updates of edited and deleted messages. Disabling this feature saves one database query on each refresh request. Disable it if you can live without this feature.
  • Number of messages to display on the custom and archive pages. You've set them to 50 and 100 which are the maximum values, respectively. Set them to 20 and 50.
User avatar
kasimi
Extension Customisations
Extension Customisations
Posts: 3717
Joined: Sat Sep 10, 2011 7:12 pm
Location: Germany
Contact:

Re: Low performance causing webhost to forcibly disable mCha

by rahlzel » Sun Mar 26, 2017 10:11 pm

Thanks, kasimi.

I have ~3000 registered accounts and up to a dozen to two dozen or so people chatting during peak hours (7 users at this very moment).

I've made your recommended changes except for "Live updates of edited and deleted messages". I'll see if that does the trick.

I wanted to also note that the NFOservers CEO mentioned to me the other day that, after checking it himself, the extension in its current form might be OK. It seems he found the server's RAID has multiple failures reported so he's looking into it.

Thanks again.
rahlzel
Registered User
Posts: 19
Joined: Thu Aug 26, 2010 4:51 am