Hacker News new | comments | ask | show | jobs | submit login

Getting this error:

    Error: 500 Internal Server Error

    Sorry, the requested URL 'http://clickotron.com/' caused an error:

    Internal Server Error
    Exception:

    IOError(24, 'Too many open files')
    Traceback:

    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 862, in _handle
        return route.call(**args)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 1732, in wrapper
        rv = callback(*a, **ka)
      File "server.py", line 69, in index
        return template('index', left_articles=left_articles, right_articles=right_articles)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3595, in template
        return TEMPLATES[tplid].render(kwargs)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3399, in render
        self.execute(stdout, env)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3386, in execute
        eval(self.co, env)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 189, in __get__
        value = obj.__dict__[self.func.__name__] = self.func(obj)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3344, in co
        return compile(self.code, self.filename or '<string>', 'exec')
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 189, in __get__
        value = obj.__dict__[self.func.__name__] = self.func(obj)
      File "/usr/local/lib/python2.7/dist-packages/bottle.py", line 3350, in code
        with open(self.filename, 'rb') as f:
    IOError: [Errno 24] Too many open files: '/home/ubuntu/clickotron/views/index.tpl'



That'll teach you to do disk I/O on every page render.


Yep. Have a separate process cache a few up and simply cp over the active one to be served as a big bag of immutable bits. Bonus points for using a CDN.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: