jprichardson / jprichardson/node-google
app completly crash and server restarted sometimes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 456
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
Hi @jprichardson ,
First thanks for this awesome project.
But I have a small issue with this module in Meteor. When I try to use proxy in request option sometimes for some proxy my app restarted and crash completely with following error:
W20160607-14:55:35.706(4.5)? (STDERR) events.js:72
W20160607-14:55:35.707(4.5)? (STDERR) throw er; // Unhandled 'error' event
W20160607-14:55:35.707(4.5)? (STDERR) ^
W20160607-14:55:35.710(4.5)? (STDERR) Error: read ECONNRESET
W20160607-14:55:35.710(4.5)? (STDERR) at errnoException (net.js:905:11)
W20160607-14:55:35.711(4.5)? (STDERR) at TCP.onread (net.js:559:19)
=> Exited with code: 8
This is my code:
google.requestOptions = {
proxy: proxy,
timeout: 3000
};
google.resultsPerPage = 50;
let syncGoogle = Meteor.wrapAsync(google);
let googleResult;
try {
googleResult = syncGoogle(keyword);
for (let i = 0; i < googleResult.links.length; ++i) {
// some process on result.
}
}
catch (error) {
console.error("error: " + error);
}
Can you help me to fix this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the requestOptions proxy path used with Meteor.wrapAsync and reproduce the logged ECONNRESET failure with a proxy. Inspect how that error is emitted and determine what behavior is expected when the proxy connection resets; done means the application no longer crashes or restarts for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100