djc / couchdb-python

Python library for working with CouchDB
Other
202 stars 86 forks source link

CouchDB 2.0 - syncing views make CouchDB hanging #308

Open rdbisme opened 8 years ago

rdbisme commented 8 years ago
import couchdb
import couchdb.mapping as cmap

c = couchdb.Server()
db = c['test']

class TestDoc(cmap.Document):
    @cmap.ViewField.define('test_view')
    def test_view(doc):
        if doc:
            yield doc['id'], doc

test_doc = TestDoc()
# test_doc.test_view.sync(db)

This on ArchLinux hangs the database. There's a couchdb process consuming all the CPU resources and I need to force the restart of the service. I cannot even test the views with the new Fauxton web view since I cannot find a way to switch the language of the query server as it was possible with Futon :'(

djc commented 8 years ago

Hey, thanks for filing this issue. Unfortunately I haven't been able to get CouchDB 2 to install yet, since it lacks a generic packaging/installation system. I also haven't used the view server much. All this means that I probably won't have time to solve this issue in the near future.

rdbisme commented 8 years ago

Ok, thanks in any case. I will investigate about that...

danballance commented 8 years ago

Just a note about running 2.0 for others. I have been using Docker containers from here:

https://hub.docker.com/_/couchdb

It's working very nicely. Lets me test a 3 node cluster with load balancer with just a few basic commands.

rdbisme commented 7 years ago

@danballance can you reproduce the bug I'm highlighting?