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
Couchdb stops activity and then after some time we have always timeouts #3083
Comments
@raulmartinezr are you using Docker volumes to mount a CouchDB data volume or using a storage driver to write to the Docker filesystem directly? If the latter, which driver are you using? |
Hi @willholley ! we are using tmfs tmpfs:
- /opt/couchdb/data As long as we do not need to persist data between runs, that option was usefull. BR, |
Thanks @raulmartinezr. Just out of interest, are you able to reproduce the problem using |
Hi @willholley , I tried to reproduce with podman but it was not possible. With podman it's working fine. Seems to be something related to docker daemon. What do you think? Thanks, |
Thanks @raulmartinezr - that's certainly interesting. What version of Docker are you running (output of |
Hello! Thats what I have Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:44 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:44:15 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
|
@raulmartinezr that looks recent enough. I don't know Docker well enough to dig into this I'm afraid. I can only suggest looking for differences in the |
please reopen if there is something CouchDB can do to run better in the docker env |
Description
We use dockerized couchdb in local development environment to test applications.
The procedure for each test:
We have aprox 70 tests
For each database a few documents are created
If we execute tests module by module (each module contain between 1 and 10 tests ) there is not any issue, but if we execute all at the same time (sequentially, without parallelism), then at some point tests hangs
We observed
Example (It's not always the same)
Request captured with tcpdump

After some time (1min 9s), timeouts

HW and environment
This is how the container processes looks. Earlang (beam.smp) is the most consuming, with peaks of 70% CPU

Theads of beam.smp: Just when issue happens
I monitored threads during the whole process. Just before the crash, it seems scheduler threads increase the activity
top - 20:55:05 up 2:58, 0 users, load average: 3.93, 2.31, 2.35 Threads: 46 total, 0 running, 46 sleeping, 0 stopped, 0 zombie %Cpu(s): 46.2 us, 4.3 sy, 0.0 ni, 49.6 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 15687.8 total, 1947.6 free, 7294.3 used, 6445.9 buff/cache MiB Swap: 980.0 total, 980.0 free, 0.0 used. 7200.1 avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 54 couchdb 20 0 4568544 62092 10904 S 40.0 0.4 0:07.25 2_scheduler 53 couchdb 20 0 4568544 62092 10904 S 33.3 0.4 0:20.74 1_scheduler 55 couchdb 20 0 4568544 62092 10904 S 33.3 0.4 0:06.63 3_scheduler 56 couchdb 20 0 4568544 62092 10904 S 20.0 0.4 0:05.66 4_scheduler 37 couchdb 20 0 4568544 62092 10904 S 6.7 0.4 0:00.03 async_2 6 couchdb 20 0 4568544 62092 10904 S 0.0 0.4 0:00.03 beam.smp 34 couchdb 20 0 4568544 62092 10904 S 0.0 0.4 0:00.00 sys_sig_dispatc 35 couchdb 20 0 4568544 62092 10904 S 0.0 0.4 0:00.00 sys_msg_dispatc 36 couchdb 20 0 4568544 62092 10904 S 0.0 0.4 0:00.18 async_1 38 couchdb 20 0 4568544 62092 10904 S 0.0 0.4 0:00.14 async_3 .....
Any idea about what could be the cause? Any hint would be appreaciated.
Steps to Reproduce
There is not a fixed trigger for the issue.
Expected Behaviour
We would expect couchdb can handle this load even with docker. It's not heavy, during tests we have 15operations per second max.
Your Environment
Additional Context
Full couchdb configuration
Some errors identified in the startup. They seem not relevant for the case.
_users db
does not exists (but seems to be created afterwards)[couchdb] single_node="true"
The text was updated successfully, but these errors were encountered: