I have made a Wai web application and it is being run using Warp. However I have one AJAX request that takes quite some time to finish, while that request is pending, no other requests will be accepted by the server. I thought Warp was capable of handling concurrent requests. Am I missing something? The way I run Warp is just by calling run port app
where run
is imported via import Network.Wai.Handler.Warp (run)
and app
is my Wai application.
I was trying Happstack Lite to see whether it would solve my problem, and there the -threaded
flag was used when compiling the web application, which also solved my concurrent requests problem in the Warp application. I was under the assumption that GHC would have threading support by default, but apparently this have to be specified explicitly during compilation.