-
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
Long running erlang map/reduce can block view compaction from completion, leaking erlang procs #4725
Comments
Additional piece of useful info, it seems that while the index is running for the first time I got this from the erlang views metadata, the leaking erlang procs appear to be the "clients waiting for the index".
|
This does eventually resolve gracefully, given enough erlang procs and storage. Additional change that had to be made to keep on top of storage was to increase the view ratio smoosh concurrency values since stuck compactions prevented other compactions from running. |
One strategy could be to periodically ping the https://docs.couchdb.org/en/stable/api/ddoc/common.html#db-design-design-doc-info endpoint and wait until the index has completed building before querying it to avoid piling up too many client requests if the index is large. Using a larger Q (resharding) could also help parallelize indexing building if you have the computation and disk throughput resources. |
Yeah Nick, in our case unfortunately this was a live production server so we had no trivial means to block users from attempting to access the view. Worth noting, none of these clients were waiting, all view requests to this view are stable=false&update=lazy |
Hi actually I can't see any outstanding lines in debug mode in the log. do you know how to flush debug from erlang? |
|
Description
A long running/slow erlang map/reduce due to a new shard deployment, appears to be blocking that shards view compaction from completing. It also appears to be leaking/growing erlang procs at a steady rate, between 5k-10k per hour.
Steps to Reproduce
Start view Compaction
Start long Erlang/reduce
View Compaction tries to complete, is unable to until indexer completes (suspected, waiting to observe this outcome)
Observe steady increase in erlang procs (may require continued insertion/interaction with the shard)
Expected Behaviour
View compaction should not be blocked
Erlang procs should not continue to increase until it hits the limit and crashes
Your Environment
AWS C6i.x32large 5 nodes q=3 n=5
Additional Context
We resharded which resulted in the erlang map reduce being a lot longer than it should(not incremental).
The text was updated successfully, but these errors were encountered: