Closed GoogleCodeExporter closed 9 years ago
Hi, Ivan!
About couchdb.
How much documents in your database? If quite a lot so this query will be
runned for a long time, because you had executed temporary view which must
index all your documents before any result will be returned. What about
permanent views? Is any problems with them?
About additional information.
I have not any ubuntu host to test, but this code works without any exceptions
on windows, gentoo and slackware linux against same python version. I don't
think that ubuntu have specific python sockets, but definely there is needed
more information, e.g. test against local socket server, remote host, list
cases when .read() is successive and when it have failed to analyze problem.
Original comment by kxepal
on 9 Nov 2010 at 3:30
[deleted comment]
Hello.
I have only 6 documents. And according to my query I have to get 3 documents.
However it is waiting even i do len on query:
map_fun = '''function(doc) { if (doc.name=='Name1'){ emit(doc.valval);}}'''
results = db.query(map_fun)
print len(results)
Following returns all documents one by one
for ID in db:
doc = Document.load(db,ID)
print doc
Is not query mechanism working?
Original comment by Ivan.Kos...@gmail.com
on 14 Nov 2010 at 8:10
Does the same map function work when pasted into Futon's "Temporary view"? Are
there any errors in CouchDB's log files?
Original comment by matt.goo...@gmail.com
on 14 Nov 2010 at 8:52
Hello Matt.
First of all - shame on me. :-)
I appreciate you for your comment - check CouchDB log. I did not check it.
Issue is solved.
Step by step:
$ sudo tail /usr/local/var/log/couchdb/couch.log
[Sun, 14 Nov 2010 20:11:04 GMT] [error] [<0.2623.34>] OS Process Error
<0.22953.40> :: {os_process_error,{exit_status,127}}
One small configuration issue is the cause of this error.
I tried to to following:
$ couchjs /usr/share/couchdb/server/main.js
/usr/local/lib/couchdb/bin/couchjs: error while loading shared libraries:
libmozjs.so: cannot open shared object file: No such file or directory
$ cat /etc/ld.so.conf.d/xulrunner.conf
/usr/lib/xulrunner-1.9.2.10
/usr/lib/xulrunner-devel-1.9.2.10
$ ls /usr/lib/ | grep xulrunner
xulrunner
xulrunner-1.9.2.12
xulrunner-addons
xulrunner-devel-1.9.2.12
So, path is wrong. I fixed path here /etc/ld.so.conf.d/xulrunner.conf
and did following
$ sudo ldconfig
then
$ couchjs /usr/share/couchdb/server/main.js
["reset"]
I got - true
Then I executed my query script...
It's working!
Original comment by Ivan.Kos...@gmail.com
on 19 Nov 2010 at 7:59
Great to hear it's sorted now. Unfortunately, this problem happens every time
Ubuntu's xulrunner package is updated. If you add new entries to xulrunner.conf
before upgrading and remove the old entries once the upgrade is complete you
can avoid the problem.
Original comment by matt.goo...@gmail.com
on 19 Nov 2010 at 8:49
Original issue reported on code.google.com by
Ivan.Kos...@gmail.com
on 7 Nov 2010 at 7:09