Closed
Description
by andy.gayton:
What steps will reproduce the problem? 1. Start the example hello world web server: package main import ( "http"; "io"; ) // hello world, the web server func HelloServer(c *http.Conn, req *http.Request) { io.WriteString(c, "hello, world!\n"); } func main() { http.Handle("/hello", http.HandlerFunc(HelloServer)); err := http.ListenAndServe(":12345", nil); if err != nil { panic("ListenAndServe: ", err.String()) } } 2. Run apache bench against the server: ab -n 100000 -c 1 http://localhost:12345/hello What is the expected output? What do you see instead? On my laptop, the server hangs around 16400 requests: andy@romana:~$ ab -n 100000 -c 1 http://localhost:12345/hello This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 10000 requests apr_poll: The timeout specified has expired (70007) Total of 16387 requests completed The server doesn't need to be restarted, to repeat another attempt, which will also hang around 16400 requests. What is your $GOOS? $GOARCH? andy@romana:~$ echo $GOOS $GOARCH darwin 386 Which revision are you sync'ed to? (hg log -l 1) andy@romana:~/go$ hg log -l 1 changeset: 3952:64e703cb307d tag: tip user: Russ Cox <rsc@golang.org> date: Tue Nov 10 14:09:01 2009 -0800 summary: update video links