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
Database stopped working after upgrading to CouchDB 3.2.0 and "unknown_error : badarith" was logged #3789
Comments
If I remove the following section from
Is "infinity" no longer a supported value for this setting? |
Thanks for the report, @arnesten It is indeed a bug. The request_timeout value from fabric in 3.2.0 is used in an arithmetic expression, while previously in 3.1.1 it was just passed to Erlang VM's It seems the infinity value was undocumented, but again so was is whole |
`infinity` it turns out is a valid configuration value for fabric request_timeout. We can pass that to Erlang `receive` statement, any arithmetic with it would fail. To guard against the crash use the max small int value (60 bits). With enough shards, due to the exponential nature of the algorithm, we still get a nice progression from the minimum 100 msec all the way up to the large int value. This case is illustrated in the test. Issue: #3789
`infinity` it turns out is a valid configuration value for fabric request_timeout. We can pass that to Erlang `receive` statement, any arithmetic with it would fail. To guard against the crash use the max small int value (60 bits). With enough shards, due to the exponential nature of the algorithm, we still get a nice progression from the minimum 100 msec all the way up to the large int value. This case is illustrated in the test. Issue: #3789
The fix for this was merged in 3.x #3790 |
Thank you! That was fixed quickly 👍 |
Closing the issue for now. The fix should be released in the next bugfix 3.2.1 release |
Description
I tried to upgrade from CouchDB 3.1.1 to CouchDB 3.2.0, but then the database stopped working completely. The following error was logged 100s of times per minute:
When I downgraded to CouchDB 3.1.2, the database started working again and no errors were logged. I haven't had time to dig deeper yet as downgrading back to an earlier version worked. But I thought it was a good idea to post about it here in case others experience the same issue.
Your Environment
The text was updated successfully, but these errors were encountered: