Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Problems with gae-mini-profiler #36

irvingpop opened this Issue · 4 comments

3 participants


Runs fine in dev_appserver, but push to appspot and the X-MiniProfiler-Id is getting lost. Sometimes traceback, rest of the time you can't "share" the stats.


Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/", line 224, in Handle
    for chunk in result:
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flaskext/gae_mini_profiler/", line 286, in __call__
  File "/python27_runtime/python27_dist/lib/python2.7/", line 149, in runcall
    return func(*args, **kw)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/appstats/", line 1284, in appstats_wsgi_wrapper
    result = app(environ, appstats_start_response)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flaskext/gae_mini_profiler/", line 269, in wrapped_appstats_app
    return old_app(environ, start_response)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flask/", line 1690, in wsgi_app
    return response(environ, start_response)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/werkzeug/", line 1083, in __call__
    start_response(status, headers)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/appstats/", line 1281, in appstats_start_response
    return start_response(status, headers, exc_info)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flaskext/gae_mini_profiler/", line 257, in profiled_start_response
    return start_response(status, headers, exc_info)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/", line 156, in _StartResponse
    (_GetTypeName(value), value, name))
InvalidResponseError: header values must be str, got 'NoneType' (None) for 'X-MiniProfiler-Id'

Added thought: Could it be related to the fact that GAE mini profiler is not safe to use with Python 2.7 and threadsafe: true?

Per this pull request:


Confirmed: Setting "threadsafe: false" resolves mini profiler issues.


@irvingpop: Thanks for confirming! Will update when the upstream profiler becomes thread-safe.


upstream profiler seems to be thread-safe now. It also has some new cool features. Please sync with upstream.

@kamalgill kamalgill closed this in f27e931
@garethreakes garethreakes referenced this issue in Khan/gae_mini_profiler

thread safe issue with dev_appserver and 1.8.1 #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.