[plt-scheme] intermittent "Connection reset by peer" with web server on mac

From: Simon Michael (simon at joyful.com)
Date: Wed Jul 9 20:45:39 EDT 2008

> But if I replace the 5 passed to `tcp-listen' with 100 or more ---
> making the TCP listener "backlog" larger than the number of attempted
> concurrent connections --- then I'm unable to trigger the "Connection
> reset by peer" error in the original server and `ab' configuration. If
> I then raise the `ab' concurrency to 200, the errors come back.

That's what I see -

> (According to system headers, the maximum backlog value in Leopard is
> 128, so it doesn't help to pass a larger value to `tcp-listen'.)

Ah, good to know.

> confirm that with a ListenBackLog setting of 50 (instead of the  
> default
> 511), Apache also leads to "Connection reset by peer" errors from  
> `ab'.

Interesting. Even more interesting, I can repeatably kill OS X by  
testing this stuff. Eg with tcp-listen's queue increased to 100 and  
running ab -n 10000 -c 100 ... a few times, I will pretty soon see  
either a freeze with a "you must reboot" screen, or a reboot without  
warning. Is it just me ? I recently added third-party ram to this  
macbook, still it's the first time I've seen such a thing.

Posted on the users mailing list.