Increase performance using config_override.php

Version 7.11.4
Sugar Version 6.5.25 (Build 344)

I am trying to increase performance with a mysql master/slave cluster.
Is there any information on how to do this using config_override.php?
I have a properly set of mysql servers and a SuiteCRM instance all communicating.
All changes in the CRM are properly replicating across the servers.

I want to set all listviews and reports to use the slave mysql server to increase performance.

I tried entering the following to config_override.php I found at Sugar help

$sugar_config['db']['reports'] = array(
 'db_host_name' => '',
 'db_user_name' => 'root',
 'db_password' => 'kiRan16',
 'db_name' => 'suitecrm',
 'db_type' => 'mysql',
 'db_manager' => 'MysqliManager'

$sugar_config['db']['listviews'] = array(
 'db_host_name' => '',
 'db_user_name' => 'root',
 'db_password' => 'kiRan16',
 'db_name' => 'suitecrm',
 'db_type' => 'mysql',
 'db_manager' => 'MysqliManager'

and I get,

This page isn’t working is currently unable to handle this request.


When I remove it all is well

The only applicable hook at the moment is the List View, which does pass an instance name to the DB factory like DBManagerFactory::getInstance('listviews');

so you can try with only the following setting

$sugar_config[‘db’][‘listviews’] = …


I tried just the listviews, still errors out.
what is the DB factory you refence?

It’s weird nothing makes it to the log, just get the error 500, and when I remove the entry in config_override all goes back to normal.

Make sure you also check the PHP log (usually php_errors.log), it’s defined in your config.php.

config.php does not reference a php error log.
I loooked in the apache log nothing helpful there either.
phpinfo.php gives no clue either.

I appreciate your help.

Sorry, my bad :frowning: . I meant php.ini not config.php

I found the php.ini and turned on error logging. There was no relevant info there.

I re-entered the following into confg_override.php and the suitecrm instance loaded fine.

$sugar_config[‘db’][‘listviews’] = array(
‘db_host_name’ => ‘’,
‘db_user_name’ => ‘root’,
‘db_password’ => ‘kiRan16’,
‘db_name’ => ‘suitecrm’,
‘db_type’ => ‘mysql’,
‘db_manager’ => ‘MysqliManager’

Listview now works fine with these entries, even when the mysql slave server off. Is that from design? Or are these entries simply being ignored?

How can I tell if the slave is serving the listview data for sure?
I am running all servers from virtualbox it is hard to determine a performance increase.

Just to make sure - You’re not really sharing your root password online, are you?

My suggestion would be to use a Subdomain sort of thing for Master/Slave mysql. will use the slave DB in order to not put load on master. in the subdomain, hide all modules except show the reporting stuff.

no, its just a virtual development

1 Like

I must tell you, I never heard of this multiple-DB set-up, and I don’t know how it’s supposed to work…

That said, it is an interesting topic :slight_smile:

I think it’s going through here

perhaps add some logging there to try and get a glimpse of what’s going on…

I’m not sure how to do that.

I think it should be working. But I can’t tell if the reportwriter or list view is actually pulling from just the slave.

Our goal.
Multiple CRM web servers sharing /var/www/html via NFS .
We will manually assign url’s to our agents (poor man’s load balanceing)
Seperate MySQl master and slave servers
Using config_override to hammer the slave for read only reports and listviews leaving the master available for the data writes.