koniu / recoll-webui

web interface for recoll desktop search
275 stars 55 forks source link

Error 500: Internal Server Error - After !!202!! search #29

Closed Percent01 closed 10 years ago

Percent01 commented 10 years ago

I use Recoll 1.19.14 with XapianDB 1.2.17

I start webui this command: "nohup python ./webui-standalone.py >/dev/null 2>&1&"

I get this error message after !!202!! searching (I test many times and I always get error message after 202. webui search):

Sorry, the requested URL 'http://X.X.X.X/results?query=asdf&dir=%3Call%3E&after=&before=&sort=relevancyrating&ascending=0&page=1' caused an error:

Internal Server Error

Exception:

EnvironmentError("Can't open index",)

Traceback:

Traceback (most recent call last): File "/opt/recoll/recoll-webui-master/bottle.py", line 744, in _handle return route.call(_args) File "/opt/recoll/recoll-webui-master/bottle.py", line 1479, in wrapper rv = callback(_a, _ka) File "/opt/recoll/recoll-webui-master/bottle.py", line 2850, in wrapper result = func(_args, **kwargs) File "/opt/recoll/recoll-webui-master/webui.py", line 241, in results res, nres, timer = recoll_search(query) File "/opt/recoll/recoll-webui-master/webui.py", line 180, in recoll_search query = recoll_initsearch(q) File "/opt/recoll/recoll-webui-master/webui.py", line 157, in recoll_initsearch db = recoll.connect(config['confdir']) EnvironmentError: Can't open index

Percent01 commented 10 years ago

I got this message on the console:

:2:../rcldb/rcldb.cpp:830:Db::open: exception while opening [/recoll-index]: Error opening table `/recoll-index/position.': Couldn't open /recoll-index/position.baseA: Too many open files Couldn't open /recoll-index/position.baseB: Too many open files

:2:pyrecoll.cpp:1531:Db_init: db open error Traceback (most recent call last): File "/opt/recoll/recoll-webui-master/bottle.py", line 744, in _handle return route.call(_args) File "/opt/recoll/recoll-webui-master/bottle.py", line 1479, in wrapper rv = callback(_a, _ka) File "/opt/recoll/recoll-webui-master/bottle.py", line 2850, in wrapper result = func(_args, **kwargs) File "/opt/recoll/recoll-webui-master/webui.py", line 241, in results res, nres, timer = recoll_search(query) File "/opt/recoll/recoll-webui-master/webui.py", line 180, in recoll_search query = recoll_initsearch(q) File "/opt/recoll/recoll-webui-master/webui.py", line 157, in recoll_initsearch db = recoll.connect(config['confdir']) EnvironmentError: Can't open index

Percent01 commented 10 years ago

I got this comment from XapianDB guys:

"The issue is what it says - there are too many open files. We need some free file descriptors to open the index, but there are a finite number available - e.g. on modern Linux the limit is 65536. So it sounds like recoll isn't closing files in some case, as it's unlikely it really needs so many files open at once.

This is a recoll issue, not a Xapian one. There's nothing we can really do if there aren't file handles available, short of randomly closing some which wouldn't be helpful overall."

ghost commented 10 years ago

This is quite certainly a problem in the Recoll Python module. No need to bother Xapian or Webui for now :) Working on it.

Percent01 commented 10 years ago

It was fixed in Recoll 1.19.14p1 version.