Help
Ask questions about how to do or fix things in Arrowchat
User avatar
endea
Free
 
Posts: 2
Joined: 09 Mar 2015, 08:04

 

by endea 26 Mar 2015, 01:54

Hi,
we are trying arrowchat and we love it, but it kills our CPU, the website is slow on loading and our hosts blocked us sometimes.

Is there a solution for CPU usage?

Can the PUSH service be a solution? http://www.arrowchat.com/push/

Thanks for helping us!
User avatar
endea
Free
 
Posts: 2
Joined: 09 Mar 2015, 08:04

 

by endea 27 Mar 2015, 02:11

Any idea?
User avatar
RNakamura
Customer
 
Posts: 1
Joined: 26 Mar 2015, 19:26

 

by RNakamura 30 Mar 2015, 17:26

same problem here... my amazon instance normally runs at 30-40%, after the arrowchat instalation went to 100 (99%) all the time. and its curious cause my website still runs ok, despite some users relating some speed problems...

When I first install, I made some tests and the CPU usage was fine, it was up to 50, 60%, no more than that. So I thought it was ok, then disable the chat to launch for users on the next day... and when I turn on it was the beginning of the problem...

arrowchat in my site it just available for one user group, no more than 50 users, 10-15 simultaneous...
User avatar
Jason
Customer
 
Posts: 2356
Joined: 12 Dec 2009, 16:06

 

by Jason 30 Mar 2015, 17:40

RNakamura wrote:same problem here... my amazon instance normally runs at 30-40%, after the arrowchat instalation went to 100 (99%) all the time. and its curious cause my website still runs ok, despite some users relating some speed problems...

When I first install, I made some tests and the CPU usage was fine, it was up to 50, 60%, no more than that. So I thought it was ok, then disable the chat to launch for users on the next day... and when I turn on it was the beginning of the problem...

arrowchat in my site it just available for one user group, no more than 50 users, 10-15 simultaneous...

Your server running at 30-40% normally is extremely high. Your server is either very poorly optimized or not powerful enough. A lot of times, running a basic optimization guide can greatly help.
User avatar
convexchange
Customer
 
Posts: 32
Joined: 09 Oct 2015, 08:37

 

by convexchange 09 Jan 2016, 19:03

I got this problem fixed.
My server with 30 people on the chatrooms was dragging and constantly at 100% CPU even with and SSD drive and the push service!! I was about to upgrade mu server (RAM and CU) but then I took a look at the queries and schema that comes with arrowchat and I found a problem when it comes to JOINS. On a busy server arrowchat_status can have thousand of rows. These are joined to your users table to pull users info. The problem is that on my tables userid is an INT while on arrowchat_status it's a varchar(50). This causes a full table scan (major performance penalty) because the tables get joined with fields of different types and so MySQL cannot use both indexes. With some schema changes I matched the types and now my site is FAST again. MySQL tweaks are very important, especially on sites with many users.
User avatar
najatuw4646
Free
 
Posts: 9
Joined: 11 Sep 2015, 23:52

 

by najatuw4646 18 Feb 2016, 01:53

Waiting for answers
gclub royal
User avatar
Jason
Customer
 
Posts: 2356
Joined: 12 Dec 2009, 16:06

 

by Jason 19 Feb 2016, 14:01

convexchange wrote:I got this problem fixed.
My server with 30 people on the chatrooms was dragging and constantly at 100% CPU even with and SSD drive and the push service!! I was about to upgrade mu server (RAM and CU) but then I took a look at the queries and schema that comes with arrowchat and I found a problem when it comes to JOINS. On a busy server arrowchat_status can have thousand of rows. These are joined to your users table to pull users info. The problem is that on my tables userid is an INT while on arrowchat_status it's a varchar(50). This causes a full table scan (major performance penalty) because the tables get joined with fields of different types and so MySQL cannot use both indexes. With some schema changes I matched the types and now my site is FAST again. MySQL tweaks are very important, especially on sites with many users.

Do you mind sharing the exact schema changes you made? The user ID fields are varchar to accommodate some sites that actually don't use INT in their user IDs.
User avatar
cocodd
Free
 
Posts: 1
Joined: 26 Mar 2016, 00:51

 

by cocodd 26 Mar 2016, 00:53

Thanks for helping us!


gclubslot
gclubslot
User avatar
AUY
Customer
 
Posts: 1
Joined: 16 Mar 2016, 03:46

 

by AUY 17 Apr 2016, 20:09

cocodd wrote:Thanks for helping us!


gclubslot
gclubslot



tweak all tables with column that is related to user id, that worked for me...

in my case, I tweaked these tables

arrowchat_admin
arrowchat_chatroom_banlist
arrowchat_chatroom_messages
arrowchat_chatroom_rooms
arrowchat_chatroom_users
arrowchat_status

changed varchar to bigint since I have values more than 2147483647 (INT)

A BIG NOTE! this tweak assumes that you only have an integer value for user ids

PS: I have file a support ticket regarding this CPU usage but after 6 days no response yet