fanscribed/fanscribed — Issue #63: Find solution to GitPython using lots of open files
Author: gldnspud
Created: 2012-02-14 01:05:52+00:00
State: open

```
Traceback (most recent call last):
File "/home/user/fanscribed-env/lib/python2.7/paste/httpserver.py", line 1068, in process_request_in_thread
self.finish_request(request, client_address)
File "/usr/local/lib/python2.7/SocketServer.py", line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.7/SocketServer.py", line 639, in __init__
self.handle()
File "/home/user/fanscribed-env/lib/python2.7/paste/httpserver.py", line 442, in handle
BaseHTTPRequestHandler.handle(self)
File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 337, in handle
self.handle_one_request()
File "/home/user/fanscribed-env/lib/python2.7/paste/httpserver.py", line 437, in handle_one_request
self.wsgi_execute()
File "/home/user/fanscribed-env/lib/python2.7/paste/httpserver.py", line 287, in wsgi_execute
self.wsgi_start_response)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/router.py", line 176, in __call__
response = self.handle_request(request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/tweens.py", line 17, in excview_tween
response = handler(request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/router.py", line 153, in handle_request
response = view_callable(context, request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/config/views.py", line 524, in __call__
return view(context, request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/config/views.py", line 266, in attr_view
return view(context, request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/config/views.py", line 239, in predicate_wrapper
return view(context, request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/config/views.py", line 319, in viewresult_to_response
result = view(context, request)
File "/home/user/fanscribed-env/lib/python2.7/pyramid/config/views.py", line 402, in _requestonly_view
response = view(request)
File "/home/user/fanscribed-env/fanscribed/fanscribed/views.py", line 193, in read
repo, commit = repos.repo_from_request(request)
File "/home/user/fanscribed-env/fanscribed/fanscribed/repos.py", line 47, in repo_from_request
commit = repo.commit(rev)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/base.py", line 378, in commit
return self.rev_parse(str(rev)+"^0")
File "/home/user/fanscribed-env/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/fun.py", line 151, in rev_parse
obj = name_to_object(repo, rev[:start])
File "/home/user/fanscribed-env/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/repo/fun.py", line 89, in name_to_object
return Object.new_from_sha(repo, hex_to_bin(hexsha))
File "/home/user/fanscribed-env/lib/python2.7/site-packages/GitPython-0.3.2.RC1-py2.7.egg/git/objects/base.py", line 64, in new_from_sha
oinfo = repo.odb.info(sha1)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-i686.egg/gitdb/db/base.py", line 256, in info
return self._db_query(sha).info(sha)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-i686.egg/gitdb/db/loose.py", line 162, in info
m = self._map_loose_object(sha)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-i686.egg/gitdb/db/loose.py", line 135, in _map_loose_object
return file_contents_ro_filepath(db_path, flags=self._fd_open_flags)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-i686.egg/gitdb/util.py", line 195, in file_contents_ro_filepath
return file_contents_ro(fd, stream, allow_mmap)
File "/home/user/fanscribed-env/lib/python2.7/site-packages/gitdb-0.5.4-py2.7-linux-i686.egg/gitdb/util.py", line 169, in file_contents_ro
return mmap.mmap(fd, os.fstat(fd).st_size, access=mmap.ACCESS_READ)
error: [Errno 24] Too many open files
```