Description of Problem:
I'm helping out with a very large installation of Revolution, in which an excess of two hundred sites are residing. Somewhat unsurprisingly, we're facing issues with it being sluggish - from document saving times taking an excess of 30 seconds, to the resource tree taking about 20 seconds to load. To distribute the load, we have the installation configured as
http://develop.modx.com/blog/2011/revolution-supports-mysql-replication-master-slave/ describes. However, with the performance as it is, I have my doubts about whether that is working properly. Adding to the doubts is the fact that every day the size of the error log exceeds 500 MB, primarily containing error messages like the second of the two pasted below.
My first question concerns how to correct such errors. Of course my first thought was to remove the --read-only option from the database that was specified. However, my understanding of the current configuration is that writes are funneled through the master database and automatically reflected (somehow with no regard for read-only) on the two slaves, while reads are primarily directed towards the slaves, lightening the load on the master. I didn't want to make one of the databases writable if that wasn't necessary.
Ultimately my question is - how else might I improve the overall performance?
Thanks.
Chris
- MODX Version: Revolution 2.2.2-pl
- PHP Version: 5.3.13
- Database Version: MySQL Ver 14.14 Distrib 5.5.20
- Additional Server Info: AWS, fairly high-spec
- Error Log Contents:
[2012-11-27 03:06:05] (ERROR @ /index.php) Error HY000 executing statement:
INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('d4nhsbkgog1d5d8j17kbtmajl6', 1353953165,
'modx.user.contextTokens|a:0:{}')
Array
(
[0] => HY000
[1] => 1290
[2] => The MySQL server is running with the --read-only option so it cannot execute this statemen
t
)
[2012-11-27 03:06:07] (ERROR @ /index.php) Error HY000 executing statement:
INSERT INTO `modx_session` (`id`, `access`, `data`) VALUES ('jjim9pdfbh5ah187gnh2b36977', 1353953167,
'modx.user.0.resourceGroups|a:1:{s:24:\"<omitted>\";a:0:{}}modx.user.0.attributes|a:1
:{s:24:\"<omitted>\";a:4:{s:16:\"modAccessContext\";a:2:{s:3:\"web\";a:1:{i:0;a:3:{s:9
:\"principal\";i:0;s:9:\"authority\";s:1:\"0\";s:6:\"policy\";a:1:{s:4:\"load\";b:1;}}}s:20:\"<omitted>\";a:1:{i:0;a:3:{s:9:\"principal\";i:0;s:9:\"authority\";s:1:\"0\";s:6:\"policy\";a:1:{s
:4:\"load\";b:1;}}}}s:22:\"modAccessResourceGroup\";a:0:{}s:17:\"modAccessCategory\";a:0:{}s:28:\"sou
rces.modAccessMediaSource\";a:0:{}}}modx.user.contextTokens|a:0:{}')
Array
(
[0] => HY000
[1] => 1290
[2] => The MySQL server is running with the --read-only option so it cannot execute this statemen
t
)