Help
User avatar
Customer
12 Posts

Tickets by User

Ticket By TPonsky 12 Dec 2020, 16:03

Description:
I was able to setup Amazon's AWS Aurora (MySQL) database cluster with a writer and a reader database. The reader database sync from writer is less than 20ms off.

I then configured the arrow chat file to use the master/slave setup. The configuration file settings are below (minus login info). The problem we experienced is that despite these settings, the system ONLY used the write endpoint for all activity. This caused the database server to max out at 99-100% CPU usage with less than 200 people online in the chat room. Can you please tell me what i did wrong in the configuration file that would keep it from doing all the select statements on the slave as it should?
Code: Select all
<?php

/*
|| #################################################################### ||
|| # ArrowChat # ||
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2010-2020 ArrowSuites LLC. All Rights Reserved. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- ARROWCHAT IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.arrowchat.com | http://www.arrowchat.com/license/ # ||
|| #################################################################### ||
*/

// Require any necessary external files for retrieving the user's session


/**
* The database information (Master Server)
*
* Your existing users and information should already be in this database. Do NOT create
* a new database for ArrowChat.
*/
define('DB_SERVER','writer-instance-1.cwbfxes47odm.us-east-1.rds.amazonaws.com');
define('DB_USERNAME','xxxxxxxx');
define('DB_PASSWORD','xxxxxxxx');
define('DB_NAME','conference');

/**
* The slave database information (Advanced Users Only)
*
* The connection information for your slave database if you are using a master/slave setup.
* Leave this information blank if you plan on only using one server. You can set up more
* than 1 slave by adding another set of defines and incrementing the last number by +1 each
* time. Ex: DB_SLAVE_SERVER_1, DB_SLAVE_SERVER_2, DB_SLAVE_SERVER_3, etc. You must also
* change the SLAVE_DATABASE and SLAVE_NUMBER config options below.
*/
define('DB_SERVER_SLAVE_1','reader-instance-1-us-east-1a.cwbfxes47odm.us-east-1.rds.amazonaws.com');
define('DB_USERNAME_SLAVE_1','xxxxxxxx');
define('DB_PASSWORD_SLAVE_1','xxxxxxxx');
define('DB_NAME_SLAVE_1','conference');

/**
* The table prefix can be left blank. A quick example of what you should input here:
*
* Example - Pretend the following list are tables:
* phpbb_friends
* phpbb_threads
* phpbb_users
*
* In the example above, the prefix would be phpbb_ because everything starts with it.
*
* Example - Pretend the following list are tables:
* friends
* threads
* users
*
* In the example above, the prefix would be blank.
*/
define('TABLE_PREFIX','default_');

/**
* These variables will help automatically connect your existing website with ArrowChat. Please
* review the descriptions below to better understand them. DO NOT INCLUDE THE PREFIX WITH THESE
* VALUES!
*
* DB_USERTABLE                     = The name of the user's table
* DB_USERTABLE_USERID           = The field for the user ID in the user's table
* DB_USERTABLE_NAME           = The field for the username in the user's table
* DB_USERTABLE_AVATAR           = The field for the avatar (input the user ID field if none exists)
*
* DB_FRIENDSTABLE                = (Optional) The name of the friend's table
* DB_FRIENDSTABLE_USERID     = (Optional) The field for the user ID in the friend's table
* DB_FRIENDSTABLE_FRIENDID     = (Optional) The field for the relationship/friend ID in the firned's table
* DB_FRIENDSTABLE_FRIENDS     = (Optional) The field to check if the users are friends
*
* All the friends stuff is optional. If your site does not have a friend's system, leave the
* values blank and change the no friend system value.
*/
define('DB_USERTABLE','users_users');
define('DB_USERTABLE_NAME','display_name');
define('DB_USERTABLE_USERID','id');
define('DB_USERTABLE_AVATAR','id');

define('DB_FRIENDSTABLE','');
define('DB_FRIENDSTABLE_USERID', '');
define('DB_FRIENDSTABLE_FRIENDID', '');
define('DB_FRIENDSTABLE_FRIENDS', '');

/**
* Friend System
*
* If your website does not have a friend system (ex: you want to display all online users) then
* change the value below from 0 to 1.
*/
define('NO_FREIND_SYSTEM', '1');

/**
* MSSQL Database
*
* If your database is MSSQL then change the value below from 0 to 1.
*/
define('MSSQL_DATABASE', '0');

/**
* Emoji Support
*
* WARNING: You cannot change this value because your database will be using the wrong collation
* type still. You must re-run the install folder.
*/
define('EMOJI_SUPPORT', '1');

/**
* Master/Slave Database
*
* Set SLAVE_DATABASE value to 1 if you are using a master/slave database. The slave database must
* be configured above. Also, set SLAVE_NUMBER to the number of slaves you are using.
*/
define('SLAVE_DATABASE', '1');
define('SLAVE_NUMBER', '1');

?>


Component:
Other

ArrowChat Version:
3.0.x

Status Change

Changed ticket status from "New" to "Pending"
Action performed by Jason ยป 28 Dec 2020, 17:30