-
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
Strange behabior in Views and listing all documents, possible error -> mfa: fabric_rpc:all_docs/3 error:invalid_compression #2307
Comments
Are you by chance storing your data directories on an NFS mount? There was a similar report recently that is similar to this. The file If you are using NFS then the long term fix would be to move your data directories to a locally mounted file system. NFS fakes POSIX compliance in ways that break the requirements for CouchDB. |
Hi @davisp thanks for the insight. I think you are right, the problem was that somehow the shard appears to have been corrupted. In the meanwhile we have recovered some of the data by reverting to a previous backup. Our current set up is a single virtual machine stored in an Hyper-V server. We are at the moment starting to think that a better choice would be to configure a CouchDB cluster inside the Hyper-V server connected to another an external instance, i.e., three couchdb instances working in parallel. The problem was that our server was shutdown by a power cut, whiteout notice, and the UPS's were not able to handle the load and also failed. But nonetheless, our virtual machine is Debian based and only holds the CouchDB server, so the file systems is ext4 and then the hyper-v image of the machine, this one yes, is stored in the NFS file system of the server. We just don't know or understand how the file become corrupted... this never happened, and we have a previous similar situation.... If you have any advice we are thankful, |
The only times I've ever seen file corruption in CouchDB is hardware failure, operator error (i.e., someone truncated the really wrong thing), or storing .couch files on NFS mounts. I don't know enough about Hyper-V to have a solid opinion but it sounds like you've got ext4 inside the VM and outside those writes are going to NFS? If so, that coupled with your power outage is likely the cause of the issue. |
Hi @davisp ,
Yap you are right, but i think (i'm also not an expert in Hyper-V) that the image file of the VM is it self saved as a whole in the NFS filesystem, so if this file was corrupted the virtual machine would not even load. But Thanks for the reply and your insight into this issue. |
@af-silva Hiya! Doing a quick Google it looks like there are various recommendations about data consistency from within a Hyper-V guest [1]. I'd give a look through some of those to see if your Hyper-V configuration is setup properly. I'd pay particularly close attention to the last couple bullet points on ways that the host needs to be configured to honor a guest's write flushing and so on. Also a heads up that you may want to also Google for hosting MySQL or PostgreSQL in Hyper-V as they'll likely have more hits on how to configure the Hyper-V host properly. I'll leave this ticket open incase you find any settings that need tweaked that we might want to add to docs somewhere. |
Closing due to no response for 3 months. |
Description
I will try to explain the best I can the behavior couch is displaying right now. I have a database with 111455 documents. In this database we have a 34 views configured, and it was in working conditions until a few days ago, now we have been experience some problems accessing some of the views and trying listing all the documents (one thing to have in mind is that some of the views work...)
Here is the log from the couch server:
I have removed the [notice] tags for brevity.
Some things that caught my eye were:
1st:
CRASH REPORT Process (<0.30219.528>) with 1 neighbors exited with reason: no match of right hand value eof at couch_file:read_raw_iolist_int/3(line:627)
2nd:
rexi_server: from: couchdb@127.0.0.1(<0.25557.530>) mfa: fabric_rpc:map_view/5 throw:{{badmatch,{'EXIT',{{badmatch,eof} ...
3rd: When executing the //_all_docs I receive
SyntaxError: JSON.parse: end of data when ',' or ']' was expected at line 2367 column 97 of the JSON data
and when looking at the couch logs I found this:here I notice tha
mfa: fabric_rpc:all_docs/3 error:invalid_compression
.From the above information my thoughts are that something is not right with the fabric_rpc call, but I have no clue at what is happening to originate this behavior. Some help would be appreciated if possible.
Steps to Reproduce
When trying to access
https://<server address>/<database>/_all_docs
I receive ->SyntaxError: JSON.parse: end of data when ',' or ']' was expected at line 2367 column 97 of the JSON data
and
https://<server address>/<database>/_design/<design document>/_view/<view>
I receive ->{"error":"unknown_error","reason":"shutdown","ref":4089041121}
The above commands are related to the description above.
Expected Behaviour
What I was expecting was the correct execution of the query, obtaining the requested data (aka documents)
Your Environment
Server: Ubuntu 16.04
Couchdb: 2.3.1
Browser used for tests: Firefox 71.0b8 (64-bit)
The text was updated successfully, but these errors were encountered: