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
{{ message }}
This repository was archived by the owner on Apr 4, 2026. It is now read-only.
Writes to the servlet output stream in a trampoline context, with no consideration of what thread pool the current thread came from. This is incredibly dangerous, since it's a blocking call, and you have no idea which thread pool you're blocking. A single slow reading client could lock up the entire application, preventing it from serving any more requests until that slow client has finished reading everything you sent to it.
Both of these calls should be dispatched to a thread pool, and not the default Play thread pool either, but rather a thread pool that is created specifically for doing blocking IO. That thread pool should be configured by default to have at least 100 threads (the number of threads in that thread pool will be equal to the number of clients can concurrently be downloading responses).
As far as I can see, this write:
https://github.com/dlecan/play2-war-plugin/blob/develop/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala#L209
and this write:
https://github.com/dlecan/play2-war-plugin/blob/develop/project-code/core/common/src/main/scala/play/core/server/servlet/RequestHandler.scala#L260
Writes to the servlet output stream in a trampoline context, with no consideration of what thread pool the current thread came from. This is incredibly dangerous, since it's a blocking call, and you have no idea which thread pool you're blocking. A single slow reading client could lock up the entire application, preventing it from serving any more requests until that slow client has finished reading everything you sent to it.
Both of these calls should be dispatched to a thread pool, and not the default Play thread pool either, but rather a thread pool that is created specifically for doing blocking IO. That thread pool should be configured by default to have at least 100 threads (the number of threads in that thread pool will be equal to the number of clients can concurrently be downloading responses).