Replies: 1 comment 10 replies
-
Hey there, thanks for the nice words. CouchDB 3.1.1 on Ubuntu 20.04 uses a more modern JavaScript library ( Further analysis: Your If you have any way to restructure your data so a loop over the document isn't required, I'd start there. This is especially true if you can do something with Mango, which will never be subject to these kinds of architectural limitations. (It's also generally 2x-10x faster than JS views.) Briefly glancing at your doc, this would entail some preformatting and denormalization of your data, including splitting your larger docs up into smaller units. If document modification is out of the question, the second option is to increase the amout of RAM on your machines. CouchDB hasn't been tuned for low CPU/RAM usage. quite the contrary. It's been tuned for big servers, and has no special functionality to avoid running out of RAM. If you're experiencing As to the view building question, 3.1.1 comes with an auto view builder that is configurable, that you wouldn't have had under 2.x. You can read more about it here: https://docs.couchdb.org/en/stable/config/indexbuilds.html#background-indexing . I'm suspicious of your Couch log since the crashes you're showing in your syslog aren't reflected there. This is probably |
Beta Was this translation helpful? Give feedback.
-
Description
Hi Everyone. I have an interesting issue that I would say is not a mission critical issue, but is enough of an annoyance that I'd like to see if there is a way to resolve it. After I create/update a view on a modestly sized database (~200 MB, ~550,000 documents), and I execute the view, I receive the following error after several seconds:
{"error":"os_process_error","reason":"{exit_status,1}","ref":3722911048}
Interestingly, I can watch the the index for the view being built through the active tasks in Fauxton, but it still fails after several seconds. If continue to manually re-execute the view, the same thing continues to occur until the index is completely built. So, in the end, I do get a working index, but I have to continually execute the view to get it!
Here is where I think it gets even more head-scratchingly interesting: This problem occurs on a CouchDB 3.1.1 instance on Ubuntu 20.04, but it does not occur on CouchDB 3.1.1 instance on Ubuntu 18.04. I set up the same test database on Ubuntu 18.04 (not replicated from the problem database), used the same view, and the index built as expected with no error being returned (except for the timeout, which is expected). The CouchDB instance on 18.04 was automatically updated from 2.3.1 to 3.0 -> 3.1 -> 3.1.1 using the standard apt-get mechanism. The CouchDB instance on 20.04 was installed on a fresh OS install as version 3.1.1 from the beginning. In both cases I have not done any modifications to the default configuration files, with the exception of adding security certificates and changing the admin password.
Here is the output of the CouchDB log.
Here is the output snippit from the syslog:
Here is the view in question:
Here is a typical document in the database:
Steps to Reproduce
Fresh install of Ubuntu 20.04 with fresh install of CouchDB 3.1.1. Create new database. Populate with > ~100,000 documents, Create the view. Execute the view. I've deleted and created multiple databases to test this and it displays the same behavior.
Expected Behaviour
The index begins to be built after making the first request to the view. I receive a timeout error, but the view index continues to be built.
Your Environment
Additional Context
Once the database is in production, we expect it to grow to several GB quite quickly. Our views will mostly be stable, so this shouldn't be a deal breaker in the future. However, if we do have to modify a view, it would be quite annoying to have to set up a cron job to make a request to the modified view every minute just so we can get a valid index built.
Praise
I'm a sole developer at my organization and was using a MySQL database to store our mission critical data for several years. The MySQL database was never replicated on another server (the data was backed up, though) because I was so busy being the only tech guy (programming, field work, and sys admin) that I kept pushing that off. I reached a point where the limitations of the MySQL database was causing me to spend too much time on application development to get around those issues. I began to seriously look at NoSQL database, and, after experimenting with MongoDB, I decided that I liked the way CouchDB did things (also the license). I can now say that I love CouchDB. I had most of our data transitioned to CouchDB in two days with no-fuss replication to another server at the same time. The production databases have been reliably serving data for several years now. It wasn't until we had a hard drive failure on one of our servers that we started fresh with Ubuntu 20.04 and discovered this problem. However, it's not enough to convince me even a little bit to leave the CouchDB way of doing things. Hat tip to the developers for producing a great database system. :)
Beta Was this translation helpful? Give feedback.
All reactions