flimflam57
flimflam57

Reputation: 1334

Strange behavior in meteor app and database

I've got a Meteor app hosted on Modulus. The app is an in-house app used by a few higher-ups in the company. We're giving it a first trial run. After deploying the app and the db to Modulus, I'm finding the data is reloading about every 10 seconds. It's like the data is reloading into minimongo, so same data appears to flash on and off. It doesn't do this running the app locally.

Insecure has been removed, but I left auto-publish in Meteor because the app needs the whole database to work with. I figured I could remove it and then publish and subscribe the whole database, but I thought that would be redundant. Could this be the problem?

I'm in contact the the Modulus folks about it, but I think they're scratching their heads. I've tried hosting the db on Compose as well with the same result. Something in the app is causing it. Was wondering if anyone might have a suggestion.

Upvotes: 0

Views: 35

Answers (1)

Guns
Guns

Reputation: 2728

Autopublish is the culprit here. Try removing autopublish and convert your data access to publish and subscribe.

If you have already built the entire app, you will have to refactor the entire app as Thai Tran mentioned in the comments.

Also, even if you have every security in place where users are locked up, autopublish still messes your app's security up. Your entire database is on the browser. Even if you have users or not. (Not a best practice in a production app).

Meteor gives autopublish only for prototypes, not production apps.

Anyways, explanation here is with autopublish on there will be lot of Tracker incomputations which might cause these errors.

Remove it and your app should be fine (Of course after you refractor your app to use publish + subscribe).

Good Luck!

Upvotes: 1

Related Questions