couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: pushing limits and possible corrupt db
Date Thu, 11 Oct 2012 22:10:30 GMT
Definitely sounds like an emfile error. Could be that erlang
translates that when opening a file but I'd have to check. I have seen
issues with .couch files having issues when running out of disk space
and the like. To recover, I would make a copy of your .couch file, and
then start truncating it a bit at a time to try and find the last
valid header that you can read from.

On Thu, Oct 11, 2012 at 3:38 PM, Jason Konrad <jason@inboxq.com> wrote:
> Today my Couch (1.0.1) took a turn for the worse. Couchdb seemed to be
> stuck in some sort of error loop which rendered all databases useless.
> I managed to isolate the problem to a specific database which was
> causing the following error.
>
> [Thu, 11 Oct 2012 17:26:02 GMT] [error] [<0.595.0>] ** Generic server
> <0.595.0> terminating
> ** Last message in was {pread_iolist,170475046269}
> ** When Server state == {file,{file_descriptor,prim_file,{#Port<0.2136>,23}},
>                               0,170475073648}
> ** Reason for termination ==
> ** {{badmatch,{ok,<<99,111,109,104,2,110,5,0,186,181,74,98,39,104,2,98,0,0
>                            ....SNIP...
>                     106,97,0,100,0,3,110,105,108,100,0,3,110,105,108,98,0,0,
>                     3,232>>}},
>     [{couch_file,read_raw_iolist_int,3},
>      {couch_file,handle_call,3},
>      {gen_server,handle_msg,5},
>      {proc_lib,init_p_do_apply,3}]}
>
> I stopped couchdb and moved the entire .couch file out of the database
> directory and then started couchdb. After that couchdb appeared to be
> normal with the other databases. The database in questions is ~159GB
> with ~9M documents and each document has 2-10 attachments.
>
> I have recently been running up against some system_limit errors which
> may have something to do with this although I have not seen any of
> these errors today. I'm also trying to track down what system_limit
> I'm hitting. If it was open files wouldn't it be a emfile error?
>
> ** {{badmatch,{error,system_limit}},
>     [{couch_file,sync,1},
>      {couch_db_updater,commit_data,2},
>      {couch_db_updater,update_docs_int,5},
>      {couch_db_updater,handle_info,2},
>      {gen_server,handle_msg,5},
>      {proc_lib,init_p_do_apply,3}]}
>
>
> Any thoughts or suggestions would be appreciated.
>
> -Jason

Mime
View raw message