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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/health returns 500 #24

Closed
jasonthomas opened this issue Dec 11, 2014 · 1 comment
Closed

/health returns 500 #24

jasonthomas opened this issue Dec 11, 2014 · 1 comment

Comments

@jasonthomas
Copy link
Contributor

The app is up, running, and responding to requests but the /health endpoint is failing. Traceback is below but I don't see any useful message.

curl https://recommend-dev.allizom.org/health -D-
HTTP/1.1 500 INTERNAL SERVER ERROR
Server: nginx
Content-Type: text/html; charset=utf-8
Date: Thu, 11 Dec 2014 13:49:00 GMT
Transfer-Encoding: chunked
Connection: close

<h1>Server Error (500)</h1>

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "health_check/views.py", line 19, in home
    return HttpResponseServerError(loader.render_to_string("health_check/dashboard.html", {'plugins': plugins}))
  File "django/template/loader.py", line 172, in render_to_string
    return t.render(Context(dictionary))
  File "django/template/base.py", line 148, in render
    return self._render(context)
  File "django/template/base.py", line 142, in _render
    return self.nodelist.render(context)
  File "django/template/base.py", line 844, in render
    bit = self.render_node(node, context)
  File "django/template/base.py", line 858, in render_node
    return node.render(context)
  File "django/template/defaulttags.py", line 208, in render
    nodelist.append(node.render(context))
  File "django/template/base.py", line 898, in render
    output = self.filter_expression.resolve(context)
  File "django/template/base.py", line 596, in resolve
    obj = self.var.resolve(context)
  File "django/template/base.py", line 734, in resolve
    value = self._resolve_lookup(context)
  File "django/template/base.py", line 788, in _resolve_lookup
    current = current()
  File "health_check/backends/base.py", line 46, in pretty_status
    return u"%s" % (HEALTH_CHECK_STATUS_TYPE_TRANSLATOR[self.status])
joaonrb added a commit that referenced this issue Dec 12, 2014
joaonrb added a commit that referenced this issue Dec 12, 2014
@joaonrb
Copy link
Contributor

joaonrb commented Dec 12, 2014

My gess is the health API was trying to wright to disk and failed. Because we dont need nothing of this I writed the db check so we dont use the defaults. Just make the folloing changes in settings

INSTALLED_APPS = (
    "corsheaders",
    "health_check",
    "health_check_db",
    "health_check_cache",
    "health_check_storage",
    "recommendation",
    "recommendation.api",
    "recommendation.filter_owned",
    "recommendation.language",
    "recommendation.simple_logging",
    "recommendation.diversity",
    "raven.contrib.django",
)

to

INSTALLED_APPS = (
    "corsheaders",
    "health_check",
    "recommendation",
    "recommendation.api",
    "recommendation.filter_owned",
    "recommendation.language",
    "recommendation.simple_logging",
    "recommendation.diversity",
    "raven.contrib.django",
)

@joaonrb joaonrb closed this as completed Dec 12, 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

2 participants