Open gmanlan opened 4 years ago
Have similar issue in production. springfox-swagger2-3.0.0-SNAPSHOT springfox-swagger-ui-3.0.0-SNAPSHOT springfox-spring-webflux-3.0.0-SNAPSHOT
HttpWebHandlerAdapter: 289 - Error [java.lang.OutOfMemoryError: Direct buffer memory] for HTTP GET "/webjars/springfox-swagger-ui/swagger-ui-bundle.js?v=3.0.0-SNAPSHOT", but ServerHttpResponse already committed (200 OK)
I had the same problem and it was caused by a SOCKS5 proxy
I had the same problem and it was caused by log4j2. I disabled logging large body
Q&A
Describe the bug you're encountering
When using Swagger-UI (through the flask-swagger-ui python package) and served with the flask/waitress web server, Swagger-UI works fine when using localhost but fails to load the page when using any IP/URL other than localhost. Specifically, the page hangs while trying to GET the static swagger-ui-bundle.js file (see screenshot). The workaround was to load swagger-ui-bundle.js using unpkg instead of loading the local version. It's interesting to notice that other static files (swagger-ui-standalone-preset.js, swagger-ui.css, etc.) are loading fine.
To reproduce...
Expected behavior
The swagger-ui page should load just fine, like when using localhost.
Screenshots
Additional context or thoughts
Since this problem is specifically related to the swagger-ui-bundle.js file, and because other static files are served correctly without problems, I assume this is not an issue related to python/flask/waitress.