swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

swagger JSON takes a long time to close #172

Closed osbornk closed 6 years ago

osbornk commented 6 years ago

I have three Play 2.6 projects that also use swagger-play 1.6.0. They all have similarly-sized swagger.json files.

On one of the projects, I get back my swagger.json in a few ms, which is expected. But on the other two projects, I get back all of the JSON except for the final closing "}" in ms. That final closing bracket takes 45-60 seconds to finally return. Eventually it does return correctly, but it also takes a long time.

If I kill my Play application, this final bracket also gets returned immediately. Something is keeping the stream open. But for the life of me, I have no idea what it could be. I don't see any obvious differences between my three applications. They all have the same version of swagger-play, Play (2.6.12), Jackson, Akka HTTP.

And this problem only exhibits itself on my local Mac, although the third application runs fine on my Mac. In our deployment environment (Kubernetes/Docker/AWS), all three applications run fine.

And ideas what it might be or where to look? I am sort of out of ideas.

osbornk commented 6 years ago

I think I just solved my own issue. Apparently, you have to include the Play gzip filter. Not sure why this makes such a big difference on localhost. But it does.