meteorhacks / cluster

Clustering solution for Meteor with load balancing and service discovery
https://meteorhacks.com/cluster-a-different-kind-of-load-balancer-for-meteor.html
MIT License
632 stars 80 forks source link

Page not loading sometimes. "Zone already exported on window the object!" #82

Open elie222 opened 9 years ago

elie222 commented 9 years ago

I was just testing out meteor-cluster on multiple digital ocean servers. I went to the app in 2 browser windows (1 regular and 1 incognito) and all worked fine. Both servers were being connected to at random.

Then I closed the incognito, reopened it, and in the page won't load and I see this in the console Zone already exported on window the object! And then something about Zone maximum call stack being exceeded.

I kept hard refreshing and nothing worked. Eventually I deleted the cluster-endpoint in the Cookies, refreshed the page, and things worked fine.

Not sure why this happened, but not good when it does.

There was a user logged in in the incognito window when I finally managed to load the page. Not sure if that makes a difference.

elie222 commented 9 years ago

This just happened again in the non-incognito window. This is a real issue.

Errors are:

zone.js?1438194812820:28 Zone already exported on window the object!
zone.js?1438194810937:279 Uncaught RangeError: Maximum call stack size exceeded
elie222 commented 9 years ago

Waiting a minute and hitting refresh fixed it now... Didn't touch cookies this time. Really strange behaviour

elie222 commented 9 years ago

If you go to this url: http://178.62.150.170/ Maybe signup with a fake account, hard refresh the page, and you'll get the problem. Happens consistently.

elie222 commented 9 years ago

I've now removed meteorhacks:zones from my project and the refresh problems seems to have disappeared.

meteorhacks:inject-initial  removed from your project
meteorhacks:zones           removed from your project

Could it be something to do with inject-initial not working well with cluster?

jamesgibson14 commented 9 years ago

I am getting the exact same problem, and I have those two packages as well.

elie222 commented 9 years ago

I recommend removing Zones. That's what I did

On 1 August 2015 at 16:48, James notifications@github.com wrote:

I am getting the exact same problem, and I have those two packages as well.

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-126917011.

jamesgibson14 commented 9 years ago

I will give it a try.

On Sat, Aug 1, 2015 at 11:23 AM, Eliezer notifications@github.com wrote:

I recommend removing Zones. That's what I did

On 1 August 2015 at 16:48, James notifications@github.com wrote:

I am getting the exact same problem, and I have those two packages as well.

— Reply to this email directly or view it on GitHub <https://github.com/meteorhacks/cluster/issues/82#issuecomment-126917011 .

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-126938647.

jamesgibson14 commented 9 years ago

Removing Zones did not work, it could be inject-initial but I can't remove that from my project... I need it.

elie222 commented 9 years ago

Interesting. Why do you need initial inject? On 4 Aug 2015 1:27 am, "James" notifications@github.com wrote:

Removing Zones did not work, it could be inject-initial but I can't remove that from my project... I need it.

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-127421555.

jamesgibson14 commented 9 years ago

I pass some data need at startup, I could probably rewrite that section, but the real question if it is initial-inject.... is why does that break the reload process? I will try removing it and see what happens.

On Mon, Aug 3, 2015 at 4:28 PM, Eliezer notifications@github.com wrote:

Interesting. Why do you need initial inject? On 4 Aug 2015 1:27 am, "James" notifications@github.com wrote:

Removing Zones did not work, it could be inject-initial but I can't remove that from my project... I need it.

— Reply to this email directly or view it on GitHub <https://github.com/meteorhacks/cluster/issues/82#issuecomment-127421555 .

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-127421697.

jamesgibson14 commented 9 years ago

I finally found a problem with my DNS that was causing this error.

elie222 commented 9 years ago

Good to know. Maybe it was the same issue for me. But either way removing zones fixed it for me On 5 Aug 2015 10:23 pm, "James" notifications@github.com wrote:

I finally found a problem with my DNS that was causing this error.

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-128117975.

rkstar commented 9 years ago

@jamesgibson14 what was the DNS problem causing the error?

jamesgibson14 commented 9 years ago

Actually since then I switched to HAProxy and but was still running into the same problem. When a client switches from one server to another it tries to download the initial meteor css and js files but errors out... I think because the hash name of the file is different from one server to the next.

On Mon, Oct 19, 2015 at 11:33 AM, rkstar notifications@github.com wrote:

@jamesgibson14 https://github.com/jamesgibson14 what was the DNS problem causing the error?

— Reply to this email directly or view it on GitHub https://github.com/meteorhacks/cluster/issues/82#issuecomment-149290737.