Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read-only error on aws aurora mysql failover action #2050

Open
itjobs-levi opened this issue Jun 7, 2023 · 3 comments
Open

read-only error on aws aurora mysql failover action #2050

itjobs-levi opened this issue Jun 7, 2023 · 3 comments

Comments

@itjobs-levi
Copy link

When failover of aws aurora mysql occurs, "The MySQL server is running with the --read-only option so it cannot execute this statement" error occurs frequently.
I think it is a temporary phenomenon caused by the promotion of the read node.
However, the nodejs connection pool continuously tries to write to the read node.
It could be that the previous write node was accessed by aws aurora endpoint dns caching.
When aws aurora failover occurs, we have to restart the application to be called as a normal writing node.
Is there any workaround for this issue?

@anton-zen
Copy link

I also encountered this. Seem like the jdbc friver for Java is doing a better job at this https://github.com/awslabs/aws-mysql-jdbc#the-aws-jdbc-driver-failover-process

@Rayyan98
Copy link

Rayyan98 commented May 17, 2024

@itjobs-levi did you find anything to get around the issue, we just faced it twice in the last couple of days

@itjobs-levi
Copy link
Author

I haven't found a solution to this problem :(
Since we are using nodejs, the java jdbc driver did not provide insight.
We designed it so that failovers rarely occur and that when a failover occurs, the application can be recovered and run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants