New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't have more than 9 connections to the same meteor domain #131

Closed
igreshev opened this Issue May 10, 2012 · 14 comments

Comments

Projects
None yet
7 participants
@igreshev

igreshev commented May 10, 2012

i deployed small test app at galesia.herokuapp.com and galesia.meteor.com. everting goes fine but you can open it not more then 9 times.

@TomWij

This comment has been minimized.

Contributor

TomWij commented May 12, 2012

Can you include the code that you are using?

Also note that Meteor is just for testing purposes.

For Heroku, you might want to look into their Scaling documentation.

@igreshev

This comment has been minimized.

igreshev commented May 14, 2012

there is no special code, it's a naked app with just one published cursor. i think the problem is related to the open connections.

@n1mmy

This comment has been minimized.

Member

n1mmy commented May 25, 2012

This is because the browser limits the number of simultaneous open connections per hostname. Each tab keeps one connection open to the server, so there is a limit to how many tabs you can have open to the same meteor app.

There is no simple fix, but long term the solution is to use a different randomly chosen hostname as the DDP endpoint for each tab (eg, a12345.ddp.galesia.meteor.com).

@glasser

This comment has been minimized.

Member

glasser commented Sep 28, 2012

Should be fixed by 2495cb2.

@glasser glasser closed this Sep 28, 2012

@glasser

This comment has been minimized.

Member

glasser commented Oct 1, 2012

I had to revert 2495cb2 because it tended to create domain names that were too long. I know how to fix it, but it will require some reconfigurations of our deploy server setup.

@glasser glasser reopened this Oct 1, 2012

@Charuru

This comment has been minimized.

Charuru commented Dec 1, 2012

Is there a solution for this?

@glasser

This comment has been minimized.

Member

glasser commented Dec 1, 2012

@Charuru The bulk of the work for this fix needs to go in the meteor deploy server, not the framework itself. I'm personally motivated to get to work on this soon because it's affecting my own apps!

@Charuru

This comment has been minimized.

Charuru commented Dec 1, 2012

Would that help people who are self hosting?

@glasser

This comment has been minimized.

Member

glasser commented Dec 1, 2012

The framework side fix will be similar to the one above but generate a shorter string that is less likely to hit DNS length issues.

@Charuru

This comment has been minimized.

Charuru commented Dec 1, 2012

I take it we just need a shorter version of Meteor.uuid and 2495cb2 will work?

@Charuru

This comment has been minimized.

Charuru commented Dec 4, 2012

Is there a timeframe for this fix? Can you confirm that having a shorter random string will do the trick? A great number of users are reporting this problem.

@glasser

This comment has been minimized.

Member

glasser commented Dec 4, 2012

Three core developers yesterday spent an hour with a whiteboard coming up with a cleaner solution that we expect to last a little longer than my last attempt and fixing it is my first priority this week. As I mentioned, it also requires some behind-the-scenes changes to our hosting service.

@Charuru

This comment has been minimized.

Charuru commented Dec 4, 2012

Thanks a lot for the update! Looking forward to the fix.

@glasser

This comment has been minimized.

Member

glasser commented Dec 7, 2012

7289950 , which has just been pushed to devel, fixes this issue. If you're using meteor deploy it should Just Work.

Here's how to get it working if you're using your own hosting. This isn't set in stone yet, but this is what will work for now. It's likely that it will change in the future as we develop the concept of a DDP URL further.

Set up DNS such that some set of distinct hostnames which differ by a block containing digits all resolve to your app. For example, for foo.meteor.com, we've arranged for ddp--1234-foo.meteor.com to resolve to foo.meteor.com, no matter what digits replace 1234.

Set the DDP_DEFAULT_CONNECTION_URL environment variable to a string like: ddp+sockjs://ddp--****-foo.meteor.com/sockjs where you want each * to be replaced by a digit. (The sockjs at the end is necessary!) If you want your connection tunneled over HTTP instead of HTTPS, use a ddpi+sockjs URL instead ("DDP Insecure").

Note that this environment variable replaces the former (undocumented) DEFAULT_DDP_ENDPOINT environment variable which used to serve a similar purpose but didn't support the * syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment