Live Helper Chat support forum.. Forum is locked. New place for questions - Github Discussions

You are not logged in.

Announcement

#1 2015-05-13 11:47:10

it3
Member
Registered: 2015-04-29
Posts: 8

Cache - purpose?

Hi

Background:
We've got a high availability cluster which uses gluster to replicate files between nodes. The chat function is installed on both nodes.

Problem:
Sporadically the load on either server (not necessarily both) goes extremely high. It happens perhaps once to three times per day, but only when the chat function is in use. Gluster starts using a high amount of CPU, and loads of php-cgi requests build up. (which look to be when livehelperchat is running chat updates every 10seconds or so.)

Looking at the gluster logs there appear to be issues with files in the chat's cache folder.

Question:

What benefit does the cache bring?
What disadvantage might there be in disabling it? (as per https://livehelperchat.com/how-to-enable-cache-71a.html )

I'd rather have it enabled, so I'm testing various CPU limit tools (nice, cpulimit and cgroups) to try and find the winning combination :-)

In the mean time I've disabled the cache to see if that stops the runaway load.

Thanks in advance for your help :-)

O.

Offline

#2 2015-05-13 11:51:20

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Cache - purpose?

Hi,

1. Never experience any issues you have
2. Cache just avoid Disk IO, otherwise there would be few tens of disk calls for templates.
3. To reduce load and eliminate 10s sync calls, you can use nodejs extensions. It remove 90% of these calls.
4. Try to see mysql slow query log, perhaps it will give a hint what's wrong.

Offline

#3 2015-05-13 12:15:42

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Cache - purpose?

Hi,

One more thing. You do not have to replicate cache folder in general. You can replicate only var folder in general. No need to replicate anything else.

Offline

#4 2015-05-13 12:26:06

it3
Member
Registered: 2015-04-29
Posts: 8

Re: Cache - purpose?

Thanks Remdex

Ah, well you see the cache folder is the clients www directory in var. :-)

If the cache folder does not require replication then yes - I think I'll move it.

Where is livehelperchat's cache folder defined? db or conf file?

O.

Offline

#5 2015-05-13 12:28:21

remdex
Administrator
From: Lithuania
Registered: 2012-09-23
Posts: 3,661
Website

Re: Cache - purpose?

It's in the core itself and not changeable at the moment. You can fill a github feature request to have it configurable. And in general disabling cache should stop writing to cache folder. But there is translations also. And they are written in any case. So in any case avoid replicate cache folder is the best thing you can do...

Offline

Board footer