Hello, im trying to configure a read replica as documented in https://processwire.com/blog/posts/pw-3.0.175/
I have already configured my aws aurora database to have read replicas
Im using elasticbeanstalk so i configured the writer and reader endpoints as env vars:
and finally added this configuration to my config.php
/**
* Installer: Database Configuration
*
*/
$config->dbHost = $_SERVER['host'];
$config->dbName = $_SERVER['db'];
$config->dbUser = $_SERVER['user'];
$config->dbPass = $_SERVER['pass'];
$config->dbPort = 3306;
$config->dbEngine = 'InnoDB';
if ($_SERVER['hostReader']) {
$config->dbReader = [
'host' => $_SERVER['hostReader'],
];
};
but now im getting this error anytime i try to load the site:
Error: Exception: SQLSTATE[HY000]: General error: 1836 Running in read-only mode (in wire/core/WireDatabasePDO.php line 889)
Any ideas what i could be doing wrong?