<p>In order to create a cross region setup for my craft website, I've created a <strong>read-only replica</strong> of my RDS DB from North Virginia region to Canada Central region.</p>

<p>I'm facing the internal server error every time Craft is trying to update the session related info in the read-only database.</p>

<p>I could have used the same DB of N.Virginia but, if the N.Virginia region is down, then there will be no DB to support the server in the Canada region.So for this reason I've created a read only replica of the RDS at N.Virginia.</p>

<p>Why I'm choosing read-replica? Because AWS updates it automatically if we update the master DB. So I'll have to update in only one place and the slave RDS across regions will be updated as well.</p>

<p>How can I resolve this?
Or, what is the best approach to AWS cross region setup for Craft website?</p>

CC BY-SA 3.0
2017-05-27T18:59:51.693Z
I suspect you'll run into all kinds of interesting problems as the slave Craft instance tries to write to its read-only database. You might consider a Varnish cache (still read-only) or some kind of automatic application-level switching to a mirrored read/write database to limit the impact of an outage. (Not my area of expertise, just thinking through the problem!)
Matt Stein
CC BY-SA 3.0
2017-05-30T05:26:34.537Z
Thank you Matt, for your response. The problem here is that AWS allows only to create Read-only replicas. And the reason why we are going for it instead of mirroring a read-write DB is that we just have to update our Master and changes will sync with slave. AWS allows to enable the writing in read-replica DB instance, so for now I have enabled that feature but this does not look like a suitable solution as anything updated on the slave will never sync with the master.
Ankit Sahu
<database><session><mysql><aws>
Problems while setting up a cross region Craft website in AWS
# Problems while setting up a cross region Craft website in AWS

(Asked by: username_0 on 2017-05-23)

In order to create a cross region setup for my craft website, I've created a **read-only replica** of my RDS DB from North Virginia region to Canada Central region.

I'm facing the internal server error every time Craft is trying to update the session related info in the read-only database.

I could have used the same DB of N.Virginia but, if the N.Virginia region is down, then there will be no DB to support the server in the Canada region.So for this reason I've created a read only replica of the RDS at N.Virginia.

Why I'm choosing read-replica? Because AWS updates it automatically if we update the master DB. So I'll have to update in only one place and the slave RDS across regions will be updated as well.

How can I resolve this?
Or, what is the best approach to AWS cross region setup for Craft website?

**Tags:** database, session, mysql, aws
> **Comments:**
> **username_1**: I suspect you'll run into all kinds of interesting problems as the slave Craft instance tries to write to its read-only database. You might consider a Varnish cache (still read-only) or some kind of automatic application-level switching to a mirrored read/write database to limit the impact of an outage. (Not my area of expertise, just thinking through the problem!)  
> **username_0**: Thank you Matt, for your response. The problem here is that AWS allows only to create Read-only replicas. And the reason why we are going for it instead of mirroring a read-write DB is that we just have to update our Master and changes will sync with slave. AWS allows to enable the writing in read-replica DB instance, so for now I have enabled that feature but this does not look like a suitable solution as anything updated on the slave will never sync with the master.  

---

## 0 answers

