See the thread at StreamingHttpResponse must consume synchronous iterators for some ideas on how to track this down.
Note that it’s possible that this is being caused by a third-party library and not your code, so you’ll need to check those out too.