Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Problems with gae-mini-profiler #36

Closed
irvingpop opened this Issue · 4 comments

3 participants

@irvingpop

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:

Traceback (most recent call last):
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 224, in Handle
    for chunk in result:
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flaskext/gae_mini_profiler/profiler.py", line 286, in __call__
    yield self.prof.runcall(result.next)
  File "/python27_runtime/python27_dist/lib/python2.7/cProfile.py", line 149, in runcall
    return func(*args, **kw)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", 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/profiler.py", line 269, in wrapped_appstats_app
    return old_app(environ, start_response)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/flask/app.py", line 1690, in wsgi_app
    return response(environ, start_response)
  File "/base/data/home/apps/s~apexbeermenu/1.364030925006454072/werkzeug/wrappers.py", line 1083, in __call__
    start_response(status, headers)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", 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/profiler.py", line 257, in profiled_start_response
    return start_response(status, headers, exc_info)
  File "/python27_runtime/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 156, in _StartResponse
    (_GetTypeName(value), value, name))
InvalidResponseError: header values must be str, got 'NoneType' (None) for 'X-MiniProfiler-Id'
@irvingpop

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:
Khan/gae_mini_profiler#30

@irvingpop

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

@kamalgill
Owner

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

@baztian

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
Open

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.