Hi,
I am trying to understand how the replication log and replication log history work. And what the relationship is between:
replication
replication_log
replication__log_history
I am trying to do a deploy to multiple remote workspaces using a custom module. The first workspace gets deployed OK but the second always hangs with the following messages printed in the nginx error log:
2018/02/26 07:30:27 [info] 27451#27451: *122 epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while sending request to upstream, client: 192.168.56.102, server: drupalvm.test, request: "GET /relaxed/live/_changes?feed=normal&style=all_docs&since=0&filter=published¶meters%5Binclude_unpublishable_entities%5D=0&limit=1000 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "drupalvm.test"
I am assuming (and please let me know if I am wrong that it's because of that since=0. Changing any of the other replication settings including setting limit to 10 does not make a difference. What is the since for? Is since=0 basically telling the replicator to check for changes since the beginning of "time"?
Is it normal for a site with 124replication entries (attempted deploys) to have only 12 replication_log entries but 512 replication_log_revision and replication_log_history entries?
Thanks for any light you may be able to shed on this.
Comments
Comment #2
jeqq commented@pavlosdan I'll try to answer all your questions.
since- This parameter is used to indicate the start sequence for replication. Each entity has assigned a sequence in the key value storage (as I remember it's equal with the timestamp when the entry was created in key value storage). Ifsinceis0then the replicator will look for all changes starting from the beginning (from the first entity).limit- Will limit the number of returned changes.replicationtable - Contains information about the Replication entity type, about a deployment. A replication entity is created on each new deployment.replication_log,replication_log_revision,replication_log_history- Tables for the Replication Log entity type.It's normal to have 124 replications, 12 replication logs and 512 replication logs revisions.
Why? - because you have created 124 new deployments (when redeploying the same deployment there will just be created a new revision_log revision, not a new replication entity and not a new replication_log entity).
Replication logs are created one entity per source + target couple (for replication from live to stage and vice versa you will have 2 replication logs).
Having multiple replication logs is obvious, on each replication (deployment) you can have new revisions for the same replication_log entity.
Comment #3
pavlosdanHi @jeqq that makes sense. Thanks for taking the time to explain how this all works together. Closing.