Closed dpetrov closed 5 years ago
I have a wagtail project which I've tested to deploy behind a nginx with both uwsgi/gunicorn. It seems like, that when the django-html is enabled either the wrong content-length is sent or somehow the clients closes the connection.
My middlewares are:
MIDDLEWARE = [ 'django.middleware.cache.UpdateCacheMiddleware', 'htmlmin.middleware.HtmlMinifyMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'wagtail.core.middleware.SiteMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', 'htmlmin.middleware.MarkRequestMiddleware', ]
when I am using uwsgi_pass and uwsgi:
curl http://myapp shows curl: (18) transfer closed with 8218 bytes remaining to read
curl: (18) transfer closed with 8218 bytes remaining to read
and into the nginx.log
*372440 client closed connection while waiting for request, ... and also.. Failed (111: Connection refused) while connecting to upstream,
If I removed the caching middlewares and move htmlmin to the end, everything seems to be working as expected. Is there anything I might be missing?
Thanks
I believe that the last version (0.11) fix this problem. I will close this issue but if this problem happens with 0.11+ fell free to reopen this issue
I have a wagtail project which I've tested to deploy behind a nginx with both uwsgi/gunicorn. It seems like, that when the django-html is enabled either the wrong content-length is sent or somehow the clients closes the connection.
My middlewares are:
when I am using uwsgi_pass and uwsgi:
curl http://myapp shows
curl: (18) transfer closed with 8218 bytes remaining to read
and into the nginx.log
If I removed the caching middlewares and move htmlmin to the end, everything seems to be working as expected. Is there anything I might be missing?
Thanks