Skip to content
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

Memory leak server crash with (0.3.0) #48

Open
koticmit opened this issue Jun 26, 2019 · 2 comments
Open

Memory leak server crash with (0.3.0) #48

koticmit opened this issue Jun 26, 2019 · 2 comments

Comments

@koticmit
Copy link

koticmit commented Jun 26, 2019

We are using this package in production and we are experiencing huge memory leaks.

When I continuously update the items that are subscribed in this publication then the memory is continuously increasing and server is getting crashed.
Our publication looks like this

Meteor.publish("getTwoLevelTests", function getTwoLevelTests(query) {
	this.autorun(function (computation) {
		let item = Test.findOne({ "_id": query._id }, { fields: { "links": 1 } });
		let itemIds = [];
		if (item && item.links) {
			item.links.forEach((link) => { link.linkedItemId && !itemIds.includes(item.linkedItemId) && itemIds.push(item.linkedItemId) });
		}
		return Test.find({ companyId: query.companyId,"links.linkedItemId": { $in: itemIds } })
	});
});

When I try to upgrade to latest version (0.4.0) of peerlibrary:reactive-publish I am getting this error "ReferenceError: ReactiveVar is not defined"

Can someone help here ?

@mitar
Copy link
Member

mitar commented Sep 20, 2019

The problem with ReactiveVar should be gone.

Can you check if the latest version is still having memory issues?

@mitar
Copy link
Member

mitar commented Sep 20, 2019

Could you check if #27 is the issue?

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

No branches or pull requests

2 participants