[
https://issues.apache.org/jira/browse/COUCHDB-78?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Damien Katz closed COUCHDB-78.
------------------------------
Resolution: Fixed
Fix Version/s: 0.8
Assignee: Damien Katz
Problem was couchdb failing to close file handles during compaction reattempts.
Fixed in revision 667188.
Note, it is not a good idea to attempt compaction on a database is near full
capacity for its write load. The problem is the compaction process may never
catch up with the writes if they never let up, and eventually it will run out
of disk space.
Compaction should be attempted when the write load is less than full capacity.
Read load won't affect its ability to complete however.
> CouchDB crashed Erland
> ----------------------
>
> Key: COUCHDB-78
> URL: https://issues.apache.org/jira/browse/COUCHDB-78
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 0.8
> Environment: Linux 2.6.25.4-30.fc9.i686 #1 SMP Wed May 21 18:12:35
> EDT 2008 i686 i686 i386 GNU/Linux
> Reporter: Sergey Kurtsev
> Assignee: Damien Katz
> Fix For: 0.8
>
> Attachments: erl_crash.dump
>
>
> Not sure if this is a CouchDB or Erlang bug or both. Please, forward to
> Erland team if appropriate.
> What happened:
> I've started several thousands of atomic inserts with modified sample php
> script from http://wiki.apache.org/couchdb/GettingStartedWithPhp
> In the middle of insert loop I initiated database compact from
> localhost:5984/_utils interface.
> Several thousands of inserts later CouchDB dumped the following error and
> terminated:
> [ ...similar successfull POSTs are cut 'till this point... ]
> [info] [<0.23823.0>] 127.0.0.1 - - "POST /test" 201
> [info] [<0.91.0>] Compaction file still behind main file (update seq=8728.
> compact update seq=8727). Retrying.
> [info] [<0.23830.0>] 127.0.0.1 - - "POST /test" 201
> [info] [<0.91.0>] Compaction file still behind main file (update seq=8729.
> compact update seq=8728). Retrying.
> [error] [emulator] Error in process <0.23848.0> with exit value:
> {{case_clause,{error,{{badmatch,{error,emfile}},[{couch_file,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}}},[{couch_db,start_copy_compact_int,2}]}
> =ERROR REPORT==== 12-Jun-2008::19:06:07 ===
> Error in process <0.23848.0> with exit value:
> {{case_clause,{error,{{badmatch,{error,emfile}},[{couch_file,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}}},[{couch_db,start_copy_compact_int,2}]}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,child_terminated},
> {reason,
> {{case_clause,
> {error,
> {{badmatch,{error,emfile}},
> [{couch_file,init,1},
> {gen_server,init_it,6},
> {proc_lib,init_p,5}]}}},
> [{couch_db,start_copy_compact_int,2}]}},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,start_error},
> {reason,file_exists},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,start_error},
> {reason,file_exists},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,start_error},
> {reason,file_exists},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> [info] [<0.23837.0>] HTTP Error (code 500): {'EXIT',
> {{{case_clause,
> {error,
> {{badmatch,{error,emfile}},
> [{couch_file,init,1},
> {gen_server,init_it,6},
> {proc_lib,init_p,5}]}}},
> [{couch_db,start_copy_compact_int,2}]},
> {gen_server,call,
> [<0.90.0>,
> {update_docs,
> [[{doc,"a2f6aac30a31e34aedc253ae17c3eaa2",
> ["4020863542"],
> {obj,[{"index",5777},{"data","Foo"}]},
> [],false,[]}]],
> [new_edits]}]}}}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,start_error},
> {reason,file_exists},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> [error] [<0.47.0>] {error_report,<0.22.0>,
> {<0.47.0>,supervisor_report,
> [{supervisor,{local,couch_server_sup}},
> {errorContext,start_error},
> {reason,file_exists},
> {offender,
> [{pid,<0.90.0>},
> {name,"test"},
> {mfa,
> {couch_db,create,
> ["test","/usr/local/var/lib/apache-couchdb/test.couch",
> []]}},
> {restart_type,transient},
> {shutdown,infinity},
> {child_type,supervisor}]}]}}
> {"init terminating in do_boot",shutdown}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.