-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Compaction dies constantly after a certain amount of documents #3571
Comments
We have a similar issue (Ubuntu Server 20.04, Docker version of CouchDB 3.1.1). We have a 30GB database which is being replicated from an another machine. Looking at the files I can see that the database files take someting like 100GB + another ca. 30GB for the compaction files. The compaction starts but always dies before it finishes. So the database gets never compacted and the compaction files are hanging there forever. I would also add that the source machine (where the replication goes from) runs CouchDB 3.1.0 on Windows Server 2019 and there the compaction seems to work just fine. Some logs:
|
Short appendix to what @schneuwlym wrote. |
I see erlang couchdb/src/couch/src/couch_emsort.erl Lines 363 to 366 in ce596c6
erlang:ceil in https://github.com/erlang/otp/blob/8b29b1ca870e6b31a0f3da067ebf4b1b4ceaa969/erts/preloaded/src/erlang.erl#L566-L570 which seems to call a C NIF function but not math:ceil which the error indicates.
@schneuwlym what version of Erlang are you running? Wonder if there is something related to that. |
Hi nickva Thanks for your reply. We are using Version 19.3.
|
@schneuwlym Erlang 19 would explain why you got an From the error message it seems as if someone had "patched" the CouchDB release to compile on 19.x and replaced the undefined
|
It doesn't really work as we have functionality relying on 20.0+ features. One particular instance is in [1]. Issue: #3571 [1] https://github.com/apache/couchdb/blob/ce596c65d9d7f0bc5d9937bcaf6253b343015690/src/couch/src/couch_emsort.erl#L363-L366
It doesn't really work as we have functionality relying on 20.0+ features. One particular instance is in [1]. Issue: #3571 [1] https://github.com/apache/couchdb/blob/ce596c65d9d7f0bc5d9937bcaf6253b343015690/src/couch/src/couch_emsort.erl#L363-L366
Hi nickva, thanks for your reply. Indeed it seems that our packager patched the source to build couchdb
But what I don't understand is, the dependency page (https://docs.couchdb.org/en/3.1.1/install/unix.html#dependencies) mentions Erlang OTP 19.x as requirement. Do I don't understand the line "Erlang OTP (19.x, 20.x >= 21.3.8.5, 21.x >= 21.2.3, 22.x >= 22.0.5)" or is this information wrong? Since it is comma sparated, I assumed that 19.x is fully supported... What Erlang version should we try? 22 or should we already try the latest, eg 24? Since 24 is not mentioned in the list I guess we should go with 22, right? Regards |
@schneuwlym that was a mistake on our part, we have documented it as "soft" supported in release notes for 3.0: https://docs.couchdb.org/en/3.1.1/whatsnew/3.0.html
Basically saying we're not going to go out of our way to break it but it may break at some point accidentally and we're not testing it. With I already updated the rebar config file to disallow Erlang 19 and will update the dependencies list in unix.html docs file too. As for which versions to try. The binary packages we release are shipped with the latest versions of 20. In production at Cloudant I have seen 20 run for a few years without any issues. So could pick 20.3.8.26 for example. However, the downside there is Erlang developers promise to support only the last two versions behind the current one. If that's a concern perhaps pick the latest patch version of 23 and make sure to periodically check for fixes. |
Note that 23.x and 24.x are not yet supported in CouchDB 3, unless you are building from the See: https://docs.couchdb.org/en/3.1.1/install/unix.html#installation-from-source for the versions supported at the time |
@wohali good point, thanks for clarifying |
Hi Updating the Erlang compiler to 22 definitely seems to fix our issue! Thank you very much for your help! Best regards |
Description
We have an issue with our CouchDB 3.1.1. We are using the default compaction configuration and this seems to work fine till the database reaches a certain amount of documents (~76K). Then the compaction dies and it is no longer able to finish the task. The compaction is restarted every 2 seconds and it always dies immediately. Till now, the problem is consistent and I didn't find any way (except of deleting the database) to fix the issue.
I read some other compaction related issues, but here I only used version 3.1.1. So no upgrade, no migration or something similar.
What I tried so far:
This is the log, which is repeated every two seconds:
If the problem occurs, inserting data is still possible, but often I get the following error message (btw, I'm using python-cloudant)
Steps to Reproduce
I did the mentioned stress test above on 3 nodes in parallel. All 3 nodes started to fail around the same amount of documents (70K-80K).
Following the script I used to reproduce the issue in my setup:
Expected Behaviour
Compaction doesn't fail :-)
Your Environment
{"couchdb":"Welcome","version":"3.1.1","git_sha":"ce596c65d","uuid":"08fb7cd0a10f35f6215a531742f7b356","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
Additional Context
Following you can find the configuration. Most of it is default:
The text was updated successfully, but these errors were encountered: