Hi all,

I was running a number of incremental tasks on Snap 0.3 to get familiar with
it and ran into a problem on OS X. I created a simple Main.hs:

site :: Snap ()
site = ifTop (writeBS "Trial")

config = setAccessLog Nothing $
         setErrorLog Nothing $
         defaultConfig

main = simpleHttpServe config site

Then compiled and ran it against

ab -n 100000 -c 2 127.0.0.1:8000
(100,000 connections, concurrency 2)

After exactly 16362 requests, ab hangs and eventually aborts due to timeout.
"netstat ­n" reveals thousands of open connections to localhost on port 8000
that are all in TIME_WAIT state. It seems connections are not properly
closed and the runtime eventually starves.

Any ideas what could be the source of the problem?

Best,
Ozgun


_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to