Ah. Now we have something.
It was really easy to change the PHP script and re-run the batch file. Over and over.
So I have a bunch of tests.
When the script was modified to use only the names "to" and "from" It worked fast... Really
fast. But any combination of the "localhost" was very long.
"source" : "http://localhost:5984/from"
"target" : "http://localhost:5984/to"
60 seconds
"source" : "http://localhost:5984/from"
"target" : "to"
60 seconds
"source" : "from"
"target" : "http://localhost:5984/to"
40 seconds
"source" : "from"
"target" : "to"
2 seconds
Replacing "localhost" with 127.0.0.1 cut about 10 seconds off.
"source" : "http://127.0.0.1:5984/from"
"target" : "http://127.0.0.1:5984/to"
60 seconds (well, it didn't cut any time off this one)
"source" : "http://127.0.0.1:5984/from"
"target" : "to"
40 seconds
"source" : "from"
"target" : "http://127.0.0.1:5984/to"
30 seconds
And lastly: "source" : "http://localhost:5984/from"
"target" : "http://127.0.0.1:5984/to"
60 seconds
So localhost is basically the same as 127.0.0.1.
And any permutation of using the url causes delays.
Sounds like it should fall under "also fun".
Thanks so far. It appears this may be solvable.
-Scott
----- Original Message -----
From: Paul Davis <paul.joseph.davis@gmail.com>
To: "user@couchdb.apache.org" <user@couchdb.apache.org>; Scott Weber <scotty2541@sbcglobal.net>
Cc: "replication@couchdb.apache.org" <replication@couchdb.apache.org>
Sent: Friday, January 24, 2014 2:25 PM
Subject: Re: Replication of attachment is extremely slow.. LOGGED INFORMATION
The important thing to note here is that test 1 is using URLs for
databases where tests 2 and 3 are using internal replication. Reading
the logs it shows that the request to write the attachment took about
72 seconds. Out of curiosity could you rerun test 3 twice more with
the following JSON bodies:
{"from":"http://localhost:5984/from", "to":"to"}
{"from":"from", "to":"http://localhost:5984/to"}
This should narrow down if there's a problem with reading attachments,
writing attachments, or some weird interplay between reading and
writing attachments.
If it turns out that the only slow version is when both are using the
"http://localhost:5984/dbname" versions then can you run one more
test:
{"from":"http://127.0.0.1:5984/from", "to":"http://localhost:5984/to"}
If that's also slow then we probably have a weird problem with the
multipart code (fun!). If its not slow then most likely this is a bug
in the HTTP worker pool implementation (also fun!).