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

Package crashes server due to "monitor timeout" #461

Open
derwaldgeist opened this issue Nov 11, 2024 · 5 comments
Open

Package crashes server due to "monitor timeout" #461

derwaldgeist opened this issue Nov 11, 2024 · 5 comments

Comments

@derwaldgeist
Copy link

derwaldgeist commented Nov 11, 2024

I used this package in Meteor 2 for many years, without any issues.

However, when I just returned to my keyboard after a couple of minutes off, I saw this error message in my new Meteor 3 app:

W20241111-17:11:43.959(1)? (STDERR) meteor://💻app/packages/aldeed_collection2.js:692
W20241111-17:11:43.959(1)? (STDERR)       const error = new Error(message);
W20241111-17:11:43.959(1)? (STDERR)                     ^
W20241111-17:11:43.960(1)? (STDERR) 
W20241111-17:11:43.960(1)? (STDERR) Error: Failed validation Connection to 127.0.0.1:3051 interrupted due to server monitor timeout
W20241111-17:11:43.960(1)? (STDERR)     at getErrorObject (packages/aldeed:collection2/main.js:572:19)
W20241111-17:11:43.960(1)? (STDERR)     at Collection.Mongo.Collection.<computed> [as updateAsync] (packages/aldeed:collection2/main.js:258:16)
W20241111-17:11:43.960(1)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:95:5)
W20241111-17:11:43.960(1)? (STDERR)     at runNextTicks (node:internal/process/task_queues:64:3)
W20241111-17:11:43.979(1)? (STDERR)     at listOnTimeout (node:internal/timers:545:9)
W20241111-17:11:43.979(1)? (STDERR)     at processTimers (node:internal/timers:519:7)
W20241111-17:11:43.979(1)? (STDERR)     at AccountsServer._expireTokens (packages/accounts-base/accounts_server.js:1133:5)
W20241111-17:11:43.979(1)? (STDERR)     at packages/accounts-base/accounts_server.js:1724:4 {
W20241111-17:11:43.979(1)? (STDERR)   invalidKeys: undefined,
W20241111-17:11:43.979(1)? (STDERR)   validationContext: {},
W20241111-17:11:43.979(1)? (STDERR)   code: undefined,
W20241111-17:11:43.979(1)? (STDERR)   sanitizedError: errorClass [Error]: Failed validation Connection to 127.0.0.1:3051 interrupted due to server monitor timeout [400]
W20241111-17:11:43.979(1)? (STDERR)       at getErrorObject (packages/aldeed:collection2/main.js:579:30)
W20241111-17:11:43.983(1)? (STDERR)       at Collection.Mongo.Collection.<computed> [as updateAsync] (packages/aldeed:collection2/main.js:258:16)
W20241111-17:11:43.983(1)? (STDERR)       at processTicksAndRejections (node:internal/process/task_queues:95:5)
W20241111-17:11:43.983(1)? (STDERR)       at runNextTicks (node:internal/process/task_queues:64:3)
W20241111-17:11:43.983(1)? (STDERR)       at listOnTimeout (node:internal/timers:545:9)
W20241111-17:11:43.983(1)? (STDERR)       at processTimers (node:internal/timers:519:7)
W20241111-17:11:43.983(1)? (STDERR)       at AccountsServer._expireTokens (packages/accounts-base/accounts_server.js:1133:5)
W20241111-17:11:43.983(1)? (STDERR)       at packages/accounts-base/accounts_server.js:1724:4 {
W20241111-17:11:43.983(1)? (STDERR)     isClientSafe: true,
W20241111-17:11:43.983(1)? (STDERR)     error: 400,
W20241111-17:11:43.983(1)? (STDERR)     reason: 'Failed validation Connection to 127.0.0.1:3051 interrupted due to server monitor timeout',
W20241111-17:11:43.984(1)? (STDERR)     details: undefined,
W20241111-17:11:43.984(1)? (STDERR)     errorType: 'Meteor.Error'
W20241111-17:11:43.984(1)? (STDERR)   }
W20241111-17:11:43.984(1)? (STDERR) }
W20241111-17:11:43.984(1)? (STDERR) 
W20241111-17:11:43.984(1)? (STDERR) Node.js v20.17.0
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

My server is running on 3050, so I guess it's the connection to Meteor's internal MongoDB that crashed.

I'm on Meteor 3.0.3, the package version is 4.0.3

Copy link

Thank you for submitting this issue!

We, the Members of Meteor Community Packages take every issue seriously.
Our goal is to provide long-term lifecycles for packages and keep up
with the newest changes in Meteor and the overall NodeJs/JavaScript ecosystem.

However, we contribute to these packages mostly in our free time.
Therefore, we can't guarantee you issues to be solved within certain time.

If you think this issue is trivial to solve, don't hesitate to submit
a pull request, too! We will accompany you in the process with reviews and hints
on how to get development set up.

Please also consider sponsoring the maintainers of the package.
If you don't know who is currently maintaining this package, just leave a comment
and we'll let you know

@nachocodoner
Copy link
Member

This is reported to the Meteor core, meteor/meteor#13108. I am starting to think if this has to do with something with this package though, since I was not able to reproduce with simple apps. I was not able to see it though with a simple app + collection2.

Do you have any repository that you know that the issue happens what I could do some testing to verify and try to find a constantly way to reproduce this issue for fixing it?

@jankapunkt
Copy link
Member

jankapunkt commented Nov 21, 2024

@derwaldgeist thanks for reporting, here are a few questions:

  • which version is Simple-Schema (Using the npm package or the meteor package of SimpleSchema)?
  • was this related to a LocalCollection or a standard Mongo.Collection (with name)
  • the error stack included
W20241111-17:11:43.983(1)? (STDERR)       at AccountsServer._expireTokens (packages/accounts-base/accounts_server.js:1133:5)
W20241111-17:11:43.983(1)? (STDERR)       at packages/accounts-base/accounts_server.js:1724:4 {

did you attach a schema to accounts related collections by any chance?

@derwaldgeist
Copy link
Author

Hi @jankapunkt: Thanks for the swift response.

I'm using this combination:

aldeed:collection2@4.0.4
aldeed:schema-index@4.0.0-beta.4
aldeed:simple-schema@1.13.1

As I can tell from the logs, it seems to be related to the Accounts server package, so I guess it's related to the (server-side) users collection?

And no, I haven't attached a schema to accounts.

(I'm using meteoreact:accounts which I patched for Meteor 3, though. But as far as I can tell, this package doesn't attach any schema either.)

The most interesting part is that this error occurred while I was off keyboard.

@derwaldgeist
Copy link
Author

@jankapunkt Seems as if @nachocodoner has found the root cause, see the issue he linked.

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

No branches or pull requests

3 participants