Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rare Coto Bug - Overloaded Memory - Fix Included #299

Open
cmumd opened this issue Aug 9, 2014 · 0 comments
Open

Rare Coto Bug - Overloaded Memory - Fix Included #299

cmumd opened this issue Aug 9, 2014 · 0 comments

Comments

@cmumd
Copy link

cmumd commented Aug 9, 2014

Steps:

  1. Deploy App to GAE
  2. Overload the Memory Usage a few times
    e.g "Exceeded soft private memory limit of 128 MB with 157 MB after servicing 0 requests total"
  3. Try to view the site.. and get error "Error 500: 'uri_for' is undefined"

馃憤 The Recent fix added to the repo #279
does help for some. However for this instance it does not.

My Fix inside /lib/BaseHandler.py::

def __init__(self, request, response):
        """ Override the initialiser in order to set the language.
        """
        self.jinja2 #Init Jinja2 And Put in the Cache before we go further. Fixes Rare Memory Overload Bug

My theory is that; the first fix helped for any immediate errors that called ErrorHandler or Similar.
However; if the error doesn't call an error handler because it is an out of memory error and displays nothing. Then we need this new line to ensure that jinja2 is created successfully, and stored for later use.

I did not commit this because there may a larger issue in the framework, which would cause it so this may be a monkey patch for a greater problem. However, I believe this just an edge case and it took me a while to find this fix since I was stumped at first as well.

Any thoughts welcomed, and thanks for a great framework!

@cmumd cmumd changed the title Rare Coto Bug - Overloaded Memory Rare Coto Bug - Overloaded Memory - Fix Included Aug 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant