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

move ECONNRESET log from error to debug #1363

Merged
merged 2 commits into from Jan 4, 2019
Merged

move ECONNRESET log from error to debug #1363

merged 2 commits into from Jan 4, 2019

Conversation

ziimakc
Copy link

@ziimakc ziimakc commented Jan 3, 2019

I'm new to js, github and this is my first PR, so feel fre to change anything.
Closes #1361

Problem
Google chrome browser keep-alive socket connection to server, so after 2 min of any https request, or if client will close browser window - server socket will timeout.

After that error will be logged:

ERROR [2019-01-03 12:24:09.858 +0000] (11508 on PredatorRTW):
    msg: "client error"
    err: {
      "type": "Error",
      "message": "socket hang up",
      "stack":
          Error: socket hang up
              at TLSSocket.onSocketClose (_tls_wrap.js:737:23)
              at TLSSocket.emit (events.js:187:15)
              at _handle.close (net.js:616:12)
              at Socket.done (_tls_wrap.js:384:7)
              at Object.onceWrapper (events.js:273:13)
              at Socket.emit (events.js:182:13)
              at TCP._handle.close (net.js:616:12)
      "code": "ECONNRESET"
    }

Proposal
Errors should be something important and this one should be moved in less important category. As @mcollina suggested in previos conversation - into debug.

Checklist

  • run npm run test and npm run benchmark
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message and code follows Code of conduct

@ziimakc
Copy link
Author

ziimakc commented Jan 3, 2019

Can't run tests for some reason. But for this change i don't think it's needed.

fastify.js Show resolved Hide resolved
@cemremengu
Copy link
Contributor

cemremengu commented Jan 3, 2019

@RTVV tests are not being run since linting is failing. You will need to fix these.

  829:5   error  Expected space(s) after "if"         keyword-spacing
  829:17  error  Expected '===' and instead saw '=='  eqeqeq

fastify.js Outdated
if(err.code == 'ECONNRESET') {
// chrome browser keep-alive socket connection
// so after 2 min of any https request server socket will timeout
log.debug({ err }, 'server socket timeout')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should just be debug  for everything.

@ziimakc
Copy link
Author

ziimakc commented Jan 4, 2019

Ok, i've moved client error to debug. What is the next step?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I think we can just land this.

@cemremengu
Copy link
Contributor

@mcollina port to 1.x ?

Copy link
Member

@delvedor delvedor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcollina
Copy link
Member

mcollina commented Jan 4, 2019

@cemremengu yes please!

@cemremengu cemremengu added the backport 1.x Issue or pr that should be backported to Fastify v1 label Jan 4, 2019
@cemremengu cemremengu merged commit 2a44139 into fastify:master Jan 4, 2019
cemremengu pushed a commit that referenced this pull request Jan 4, 2019
* move ECONNRESET log from error to debug

* move client errors to debug
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
@Eomm Eomm added the semver-minor Issue or PR that should land as semver minor label Apr 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport 1.x Issue or pr that should be backported to Fastify v1 semver-minor Issue or PR that should land as semver minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants