Rhodecode sessions : too many open files.

markus.kobold's Avatar

markus.kobold

01 Nov, 2013 03:45 PM

Got an error the other day
Module weberror.errormiddleware:162 in __call__
>> app_iter = self.application(environ, sr_checker)
Module beaker.middleware:155 in __call__
>> return self.wrap_app(environ, session_start_response)
Module routes.middleware:131 in __call__
>> response = self.app(environ, start_response)
Module pylons.wsgiapp:107 in __call__
>> response = self.dispatch(controller, environ, start_response)
Module pylons.wsgiapp:312 in dispatch
>> return controller(environ, start_response)
Module rhodecode.lib.base:358 in __call__
>> return WSGIController.__call__(self, environ, start_response)
Module pylons.controllers.core:266 in __call__
>> return response(environ, self.start_response)
Module webob.response:917 in __call__
>> start_response(self.status, headerlist)
Module beaker.middleware:149 in session_start_response
>> session.persist()
Module beaker.session:717 in persist
>> self._session().save()
Module beaker.session:423 in save
>> self.namespace.release_write_lock()
Module beaker.container:236 in release_write_lock
>> self.close(checkcount=True)
Module beaker.container:259 in close
>> self.do_close()
Module beaker.container:672 in do_close
>> fh = open(self.file, 'wb')
IOError: [Errno 24] Too many open files: '/home/apache/rhodecode/data/sessions/container_file/1/1f/1f7348190c7248bbbbaa3182743f29e3.cache'

Should we be using the database for session management? Our ulimit is set fairly high as far as I can tell with the following command on RHEL 6
[xxxxxx@rhodecode etc]$ cat /proc/sys/fs/file-max
1620606

  1. Support Staff 1 Posted by Marcin Kuzminsk... on 01 Nov, 2013 03:53 PM

    Marcin Kuzminski's Avatar

    what does

    ulimit -a
    
    show you ?

    If you're sure that the limits are set to high you could switch to database based sessions.

    ## db session ##
    #beaker.session.type = ext:database
    #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode
    #beaker.session.table_name = db_session
    

    This is the section in your ini files to do that

  2. markus.kobold closed this discussion on 26 Nov, 2013 06:07 PM.

Comments are currently closed for this discussion. You can start a new one.

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