You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just adding this here as a note since I think it should be documented and I don't want to have it get lost.
Essentially, if you try to use uWSGI + pyramid_debugtoolbar it's going to fail by default with a KeyError: PATH_INFO. This is because, by default, uWSGI attempts to reduce the number of mallocs it takes to serve a request and it will instead preallocate a Python dictionary, then for each request it will populate that dictionary, call the WSGI callable, and then afterwords it will clear that dictionary. However, things like pyramid_debugtoolbar expect to be able to keep a reference to the environ dictionary and use that after the request has finished. Once you know the issue is a issue, fixing it is pretty trivial, uWSGI allows you to configure this behavior and go to a more typical "allocate a dictionary per request, let the GC handle cleaning it up" behavior using the --wsgi-env-behavior holy configuration option.
The text was updated successfully, but these errors were encountered:
Just adding this here as a note since I think it should be documented and I don't want to have it get lost.
Essentially, if you try to use uWSGI + pyramid_debugtoolbar it's going to fail by default with a
KeyError: PATH_INFO
. This is because, by default, uWSGI attempts to reduce the number of mallocs it takes to serve a request and it will instead preallocate a Python dictionary, then for each request it will populate that dictionary, call the WSGI callable, and then afterwords it will clear that dictionary. However, things like pyramid_debugtoolbar expect to be able to keep a reference to the environ dictionary and use that after the request has finished. Once you know the issue is a issue, fixing it is pretty trivial, uWSGI allows you to configure this behavior and go to a more typical "allocate a dictionary per request, let the GC handle cleaning it up" behavior using the--wsgi-env-behavior holy
configuration option.The text was updated successfully, but these errors were encountered: