Error 500 with search

stephane.delisle's Avatar

stephane.delisle

29 Mar, 2017 01:42 PM

We are using RHODECODE CONTROL VERSION: 1.11.0 and we got a error 500 with the search feature.

We have set the ulimit -n to 50000 and restart but we still have the error. Anyidea what is going on or what I can do ?

Here is the trace :

2017-03-29 13:40:57.447 ERROR [rhodecode.lib.middleware.error_handling] [Errno 24] Too many open files
Traceback (most recent call last):
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/middleware/error_handling.py", line 72, in handle_request
    response = request.get_response(self.app)
  File "/opt/rhodecode/store/cbcb7xvl643c22r0k153ggyhvzkb87z5-python2.7-WebOb-1.3.1/lib/python2.7/site-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/opt/rhodecode/store/cbcb7xvl643c22r0k153ggyhvzkb87z5-python2.7-WebOb-1.3.1/lib/python2.7/site-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/opt/rhodecode/store/52v7z5kbn6fnbwjxcwcn9z8wdd0w66vh-python2.7-Paste-2.0.2/lib/python2.7/site-packages/paste/registry.py", line 379, in __call__
    app_iter = self.application(environ, start_response)
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py", line 103, in __call__
    response = self.dispatch(controller, environ, start_response)
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/wsgiapp.py", line 313, in dispatch
    return controller(environ, start_response)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/base.py", line 514, in __call__
    return WSGIController.__call__(self, environ, start_response)
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 214, in __call__
    response = self._dispatch_call()
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 164, in _dispatch_call
    response = self._inspect_call(func)
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 107, in _inspect_call
    result = self._perform_call(func, args)
  File "/opt/rhodecode/store/pkp5jr8c2gk53plaq37rxpqrcdxgs1g5-python2.7-Pylons-1.0.1-patch1/lib/python2.7/site-packages/pylons/controllers/core.py", line 57, in _perform_call
    return func(**args)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1904, in local_wrapper
    return wrapper(func, *args, **kwds)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/auth.py", line 1227, in __wrapper
    return func(*fargs, **fkwargs)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/controllers/search.py", line 85, in index
    requested_page, page_limit, search_sort)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/index/whoosh.py", line 117, in search
    self._init_searcher(index_name)
  File "/opt/rhodecode/store/cgg0ln7k2xdn96xi5kp8phzl5320aay9-python2.7-rhodecode-enterprise-ce-4.5.2/lib/python2.7/site-packages/rhodecode/lib/index/whoosh.py", line 225, in _init_searcher
    self.searcher = idx.searcher()
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/index.py", line 318, in searcher
    return Searcher(self.reader(), fromindex=self, **kwargs)
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/index.py", line 548, in reader
    info.generation, reuse=reuse)
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/index.py", line 535, in _reader
    readers = [segreader(segment) for segment in segments]
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/index.py", line 524, in segreader
    generation=generation)
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/reading.py", line 609, in __init__
    files = segment.open_compound_file(storage)
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/codec/base.py", line 570, in open_compound_file
    return CompoundStorage(dbfile, use_mmap=storage.supports_mmap)
  File "/opt/rhodecode/store/3ymsg0v2858j6dg6rxdyp99bp5ccidiw-python2.7-Whoosh-2.7.0/lib/python2.7/site-packages/whoosh/filedb/compound.py", line 75, in __init__
    self._source = mmap.mmap(fileno, 0, access=mmap.ACCESS_READ)
error: [Errno 24] Too many open files

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 29 Mar, 2017 02:50 PM

    Marcin Kuzminski's Avatar

    Hi Stephane,

    It might be that index got too defragmented. There's an easy solution to this, please run the indexer with --optimize flag. This should defragmentize the index and prevent problems with Too many open files.

    We'd recommend running the --optimize every week or so the same way as you run your main indexer.

    Best,

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac