-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Cannot read property 'asyncReset' of null #13539
Comments
You are most likely using a custom agent somewhere in your code. Any change you could check for that? We would always like to understand the cause of the error, rather than just making a blind fix. Preventing /cc @nodejs/async_hooks |
@AndreasMadsen Unfortunately I haven't found a better approach than to check if Though we may be able to get around this using a combination of my final proposal at the bottom of #13548 (comment) and what we do in |
I'm seeing the same error, while using an instantiated agent:
Would we see a difference in this approach vs just modifying the limits of the default global agent? |
Sorry, I should have mentioned that yes, it was node 8.1.3. |
I'm seeing the same issue on node v8.1.14. Unfortunately it's being thrown inside a dependency (new relic) so I cannot offer much of a detail. |
@aashil could you try the nightly build, most of the |
@AndreasMadsen Unfortunately I only see this on my production environment when the number of concurrent users is high, and I can't put a nightly build on it.. |
@adiulici node@8.2.0 was just released some relevant bug fixes are in it. If you are comfortable you could try it. |
HI. I'm seeing this issue as well 8.1.4 I'm using a custom agent I'll try 8.2.0 and see if the issue is resolved. |
Unfortunately, no it still happens
It is very frequent. edit trevnorris: place output in code block |
I did not see it when I changed back to version 7.10.1, it was in all the versions of 8.. that I tried. I don't believe I saw this error until I added node-redis, I'm not sure if that is a red-herring or not. |
Sorry for the delay. See the issue. I'll write up a fix tonight. |
So for context: |
Fix at #14419. |
If an uninitialized or user supplied Socket is in the freeSockets list of the Agent it would automatically attempt to run ._handle.asyncReset(), but would throw from those not existing. Guard against that by first checking that they exist. PR-URL: nodejs#14419 Fixes: nodejs#13539 Refs: nodejs#13352 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
If an uninitialized or user supplied Socket is in the freeSockets list of the Agent it would automatically attempt to run ._handle.asyncReset(), but would throw from those not existing. Guard against that by first checking that they exist. PR-URL: #14419 Fixes: #13539 Refs: #13352 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Hi, Is there any workaround to ignore this issue in version 8.1.x? Our production environment is having version 8.1.x and migrating it to a higher version may cause other implications in our codebase. Please suggest a remedy for version 8.1.x. Thanks in advance. |
We deployed Node 8.0 on our servers, but found an error when a large number of concurrent requests came.
Stack:
I checked the source file
_http_agent.js
. Line 170 issocket._handle.asyncReset();
. I think it's better to check whehtersocket._handle
is null before use.The text was updated successfully, but these errors were encountered: