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

Server crashes with: ENOENT, utime error #27

Closed
mritzco opened this issue Jul 28, 2015 · 4 comments
Closed

Server crashes with: ENOENT, utime error #27

mritzco opened this issue Jul 28, 2015 · 4 comments

Comments

@mritzco
Copy link
Contributor

mritzco commented Jul 28, 2015

Hi,

We have an application running stable for several months but today we got a server crash because of an ENOENT, utime error, from the file server.js line 156

After looking at the code I can see it's related to changing the file modified time:

fs.utimes(...
    if (err) { ...
        throw err

Even tough the throw is inside a try-catch block the application crashed. Interestingly the file was properly uploaded, moved and the time stamp was actually updated.

I understand it's mysterious than the try-catch block failed to do its job, but as it seems to be a small error does it justify risking a throw?

Any clue on how to prevent it, or should I send a pull request replacing the throw with a log message?

Thanks!

@vote539
Copy link
Collaborator

vote539 commented Jul 29, 2015

Yeah, that call to "throw" is very sloppy on my part. It's not technically part of the try/catch since it happens in a callback function. It should be removed and replaced with a console.log. If you want to submit a PR with this change that would be great :)

@mritzco
Copy link
Contributor Author

mritzco commented Jul 29, 2015

I just did, something went wrong and instead of referring this issue it opened a new one, sorry about that.
#28

@vote539
Copy link
Collaborator

vote539 commented Jul 29, 2015

Pulled and published. 👍

@mritzco
Copy link
Contributor Author

mritzco commented Jul 30, 2015

Thank you very much

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

2 participants