SSE(EventSource): why no more than 6 connections?

The reason could be every EventSource object initiates the new HTTP session and in fact opens new tcp/ip socket. Because of you're pushing data from server continuously in infinite loop, the socket keeps open continuously. All web browsers has an upper limit on simultaneous active HTTP/1 connections to the same server. Normally in range of 4 to 6 as per RFC 2616. Your browser just preventing new connection to be open as this limit to be exceeded.

With HTTP/2 and HTTP/3, the limit is higher (100 connections by default).

You may learn here some more info as well:
http://www.stevesouders.com/blog/2008/03/20/roundup-on-parallel-connections/


See the Connections per Hostname column here: http://www.browserscope.org/?category=network&v=1

More information than anyone could possibly want, and it shows the observed "6" is basically just convention.

RFC2616 suggests a limit of 2, but everyone ignores it. So http://trac.tools.ietf.org/wg/httpbis/trac/ticket/131 removes that suggestion.

Customization

It appears IE can be configured from the registry.

Firefox can be configured from within about:config, filter on network.http for various settings; network.http.max-persistent-connections-per-server is the one to change.

Chrome cannot be configured at the current time.

Opera can be configured by going to about:config, then opening "Performance" and changing "Max Persistent Connections Server".

Safari? No, not configurable, apparently.