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

Feedback&Question: Thank you for a very useful replication solution. Need timeout MySQL connection. #13

Closed
alexshnup opened this Issue Jul 22, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@alexshnup

alexshnup commented Jul 22, 2017

Feedback&Question: Thank you for a very useful replication solution. It was very useful to me. But I use an internet connection between replicas. And with an unstable network connection, an error message sometimes appears and replication stops.

Jul 21 03:52:05: [ERROR] - global_lib.py (409): An error occurred during the replica. (<class 'pymysql.err.OperationalError'>, OperationalError(2003, "Can't connect to MySQL server on '192.168.2.130' (timed out)"), <traceback object at 0x7efe501d6208>)

To run it again, need to delete the pid file
rm -rf /root/.pg_chameleon/pid/default.lock ; chameleon.py start_replica --config default

Can I increase the timeout for reconnection in the replication mode without stopping?

@the4thdoctor

This comment has been minimized.

Show comment
Hide comment
@the4thdoctor

the4thdoctor Jul 22, 2017

Owner

Hi, thanks for the feedback. I'm happy to see this tool being useful :)

As far as I understand the issue is the need to enable the replica if gets an error.

I'm adding the option --nolock to the next release 1.5 so it won't be locked in case of error.

For the timeout I need to check how to make it work, unfortunately this version is quite entangled.
I don't like the fact it keeps the connections opened during the replica but it's quite complicated to make it work differently. I'm changing this approach on the version 2. Which should also add the logical replica from PostgreSQL (thanks to psycopg 2.7) and the daemonisation.
My aim is to release the version 2 by the end of the year.

Owner

the4thdoctor commented Jul 22, 2017

Hi, thanks for the feedback. I'm happy to see this tool being useful :)

As far as I understand the issue is the need to enable the replica if gets an error.

I'm adding the option --nolock to the next release 1.5 so it won't be locked in case of error.

For the timeout I need to check how to make it work, unfortunately this version is quite entangled.
I don't like the fact it keeps the connections opened during the replica but it's quite complicated to make it work differently. I'm changing this approach on the version 2. Which should also add the logical replica from PostgreSQL (thanks to psycopg 2.7) and the daemonisation.
My aim is to release the version 2 by the end of the year.

@the4thdoctor

This comment has been minimized.

Show comment
Hide comment
@the4thdoctor

the4thdoctor Jul 22, 2017

Owner

In case of lock you can enable the replica with the command
chameleon.py enable_replica --config default

Owner

the4thdoctor commented Jul 22, 2017

In case of lock you can enable the replica with the command
chameleon.py enable_replica --config default

@alexshnup

This comment has been minimized.

Show comment
Hide comment
@alexshnup

alexshnup Jul 24, 2017

Ok. Thank you. I solved my problem like this: I created a Docker container with the application "chameleon.py" and now when the replication stops, the container automatically restarts and replication goes on again.

alexshnup commented Jul 24, 2017

Ok. Thank you. I solved my problem like this: I created a Docker container with the application "chameleon.py" and now when the replication stops, the container automatically restarts and replication goes on again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment