0

I am developing a web application with Tornado and have encountered the following problem:

I can't run more than 6 instances of my application in one browser probably because each instance creates websocket connection to Tornado server. I use standard WebSocketHandler class. They close properly, i.e. if I close the 6th tab, then I'd be able to open another application tab.

Is there any way to circumvent it? I will provide any additional information if needed.

EDIT: Connection information (I have 6 identical tabs here, 7th won't load): Connection information

pashazz
  • 127
  • 3
  • 11

1 Answers1

2

Are you sure the limitation is not on the browser? I've seen the same issue (long-polling requests, 7th or 8th won't load), but opening the URL in another browser or location works fine.

Edit: each browser has indeed a limit of simultaneous persistent connections per server, as well as global limit. See this question, and especially this response which has more up-to-date values.

Eino Gourdin
  • 4,169
  • 3
  • 39
  • 67
  • It is a browser limitation, but is there any way to avoid it? Stop using Websockets? – pashazz Aug 20 '18 at 10:55
  • 1
    It doesn't concern only websockets, but any "long" connexion (server-side events and long polling as well). So if you need to wait a long time, those other methods will have the same limitation. One way to avoid it could be to use different subdomains. Maybe there are other ways, but you will have more luck [looking for existing questions](https://stackoverflow.com/questions/561046/how-many-concurrent-ajax-xmlhttprequest-requests-are-allowed-in-popular-browse) or asking a new one, as it doesn't concern tornado :) – Eino Gourdin Aug 20 '18 at 11:06