Open tmeasday opened 11 years ago
Oh, I see. Will check what I can do to sort this.
+1, I can't prove causality here because I'm not getting any specific error messages, but I did start getting server hangs once or twice a day since I switched to PWR.
It's only on my production server, and I can't seem to get my Meteor dev server to hang locally, for what it's worth.
Update: After a lot of testing, I tracked my problem to lines 7-13 of PWR.
I'm running into the same problem. Is there are solution coming up? Do you know a work-around?
I worked on this for a while, couldn't find a workaround. Had to get off the package.
My workaround is to not use PWR for data that may be deleted, although @jonjamz thinks possibly he ran into problems even without deleting being involved, so that worries me.
I would probably steer clear of the package until further notice.
Hey guys, I'm sorry to be that late on reply, but I'm working on a big meteor project that doesn't involve this package (yet) so I didn't have time to look closer at this problem (yet). Not sure when I'll be able to, so forks/pull requests are appreciated for sure.
No worries Vitaly, I'm planning on looking at it too when I have a free moment. I know how you feel :)
I've been meaning to create this for a while, the real cause is https://github.com/meteor/meteor/issues/944.
If you join onto the same record twice (ie. you end up "publishing" it twice), if you then delete it, Meteor basically blows up.
Reproduction: clone https://github.com/tmeasday/meteor-pwr-deleting-bug
This project makes a simple Posts -> Authors relation, and creates two posts with the same author. It then publishes them via PWR.
Authors.find().count()
is 1Authors.remove(Authors.findOne()._id)
in the browser console.You should see continuous errors of the form:
Appear in the logs. The server also kind of dies once this happens.
It's readily apparent when using PWR with presences (as presences are deleted all the time and you usually want to join onto them). See https://github.com/tmeasday/meteor-presence/issues/1