arm1.ru

PUT problems after upgrading CouchDB to 1.1.0

Today we upgraded CouchDB on the production server to 1.1.0. Ran into a problem — PUT requests didn’t work, returning a strange error:

[error] => unknown_error
[reason] => function_clause

I.e. we couldn’t update a single document in the database, while POST requests for creating new documents worked just fine.

It turned out that when upgrading CouchDB from an older version to 1.1.0 there are two versions of some module left in the system (it might affect several modules) — the old one and the new one. These two versions conflict with each other.

The fix was simple, although a bit weird. You need to find where the *.beam files are stored on the system (in our case it’s /opt/couchdb), delete them (if you’re nervous, you can move them aside), then go back to the CouchDB source folder and run again:

make install
keyboard_return