1

Environment: ubuntu 14.04 LTS, Erlang 19.3-1, libmozjs185-dev libmozjs185-1.0 libicu-dev, Couchdb 2.0 built from source

Everything works perfectly, except posting data to Couchdb over the network results in around 60Kb/sec, whereas any other network operation runs at close to 10MB/sec (this is fast dedicated server with SSD disks).

I am testing just with a simple curl (file.dat is a 5mb file)

time curl -X PUT http://user:pass@myserver.com:port/test/doc1/file.dat -H "Content-Type: application/octet-stream" -d@test.dat

If I run the above command to localhost on the server, it takes 0.1 sec, if I run the command remotely it takes 50 seconds.

If I copy the same file with scp remotely or post it to a simple php page it also runs fast in < 1 sec.

So I am stumped. Tried various attachment buffer settings and delayed_commit but no change.

I enabled debug logging, but no errors or clues.

I installed exactly the same software on another server (configured the same, but in a different data center and works fine there.)

Any ideas appreciated.

steved
  • 31
  • 5
  • 2
    Sounds network related, rather than CouchDB related. Perhaps [Server Fault](https://serverfault.com/) would be the best place to ask. – Jonathan Hall Apr 23 '17 at 20:29
  • 1
    Well every other piece of software works full speed on this server over the network, http, ssh, ftp, sftp, mysql etc. Close to full 10mb/sec. Only couchdb 2.0 has this slowness issue. – steved Apr 23 '17 at 20:37
  • Do other HTTP PUT requests respond quickly? I'd guess a router/proxy/something is throttling HTTP, either intentionally or unintentionally. – Jonathan Hall Apr 23 '17 at 20:43
  • Yes, as mentioned I can post the same large file (using curl) to apache2 with a simple php page and runs full speed. But if It send it to the port that couchdb runs on (a custom port = 5089) it runs slow. I tried another port as well with no change. – steved Apr 23 '17 at 20:58
  • I setup an aws larger server and same issue there as well. If I curl put a 1mb file to couchdb 2.0 it takes 8 seconds, where as an scp copy < 1sec. – steved May 26 '17 at 04:15

1 Answers1

1

Just to followup in case anyone else runs into this. It was an issue with couchdb and will be fixed hopefully in version 2.2.0

https://github.com/apache/couchdb/issues/1409

steved
  • 31
  • 5