are you using Apache? find the file named "httpd.conf" in conf directory, look for
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies. The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For Win32, set this value to zero (unlimited)
# unless advised otherwise.
#MaxRequestsPerChild 0
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies. The child will exit so
# as to avoid problems after prolonged use when Apache (and maybe the
# libraries it uses) leak memory or other resources. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries. For Win32, set this value to zero (unlimited)
# unless advised otherwise.
#MaxRequestsPerChild 0
当我访问你的网站时,我就与服务器建立了连接,当所有数据都传输完成时,连接就中断了。同时,在我请求数据的时候又有别人来访问这个网站,那么他也算一个连接。MaxKeepAliveRequests 100表示可以最多有100个人同时请求数据,后来的人就必须等待连接,如果等待时间比较长的话浏览器就会返回无法连接的错误(这个时间由浏览器决定)。如果你的脚本执行时间较长,而且访问量比较大,就有麻烦了。apache默认情况下最多有256个同时连接(如果需要更多的话可以修改源文件然后再编译)。