Question

Since we upgraded our CouchDB from 1.2.0 to 1.3.0, we encountered a problem when compacting the database. Everything else works just fine and smooth, but when compacting the database (either via Futon, or via a Cron/CURL command) it wouldn't compact the database. View compaction works fine though. Every time the database compaction is triggered, we get this error in the couch.log file:

[Tue, 07 May 2013 02:00:01 GMT] [error] [<0.1264.1402>] Could not open file /usr/local/var/lib/couchdb/grondot.couch.compact: no such file or directory

The location of the .couch file is correct, but there is no .compact file generated when compacting.

Does anyone know about (or has resolved) this issue?

Was it helpful?

Solution

I got worried about the same error message, but turns out it seems to be an internal error while trying to find an existing compaction file that should probably not have been logged by CouchDB. If you change your log level to "debug", you'll notice that it completes the compaction despite the error that was shown:

[info] [<0.319.0>] Starting compaction for db "core-configuration"
[debug] [<0.896.0>] Compaction process spawned for db "core-configuration"
[info] [<0.130.0>] 192.168.1.20 - - POST /core-configuration/_compact 202
[error] [<0.896.0>] Could not open file /var/data/couchdb/core-configuration.couch.compact: no such file or directory
[debug] [<0.88.0>] New task status for <0.896.0>: [{changes_done,3981},
                                                   {database,
                                                    <<"core-configuration">>},
                                                   {progress,49},
                                                   {started_on,1368262489},
                                                   {total_changes,8082},
                                                   {type,database_compaction},
                                                   {updated_on,1368262490}]
[debug] [<0.88.0>] New task status for <0.896.0>: [{changes_done,7959},
                                                   {database,
                                                    <<"core-configuration">>},
                                                   {progress,98},
                                                   {started_on,1368262489},
                                                   {total_changes,8082},
                                                   {type,database_compaction},
                                                   {updated_on,1368262492}]
[debug] [<0.319.0>] CouchDB swapping files /var/data/couchdb/core-configuration.couch and /var/data/couchdb/core-configuration.couch.compact.
[info] [<0.319.0>] Compaction for db "core-configuration" completed.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top