konklone / shaaaaaaaaaaaaa

Check if a website has weak SHA-1 TLS certificates.
https://shaaaaaaaaaaaaa.com
BSD 3-Clause "New" or "Revised" License
207 stars 27 forks source link

Add timeout to childprocess #73

Closed prefork closed 9 years ago

prefork commented 9 years ago

Fixes resource leak in certificate check.

konklone commented 9 years ago

Ahhh! Thank you!

konklone commented 9 years ago

I've tested this and confirmed it addresses some causes of hanging, and deployed it to production. I really appreciate this @prefork! You've really lived up to your GitHub handle.

prefork commented 9 years ago

@konklone I'm glad I could lend a hand. Thanks for setting this project up.

konklone commented 9 years ago

Aw - got another ENOMEM crash. :(

Checking domain: themeforest.net, themeforest.net
Error: spawn ENOMEM
    at errnoException (child_process.js:1001:11)
    at ChildProcess.spawn (child_process.js:948:11)
    at exports.spawn (child_process.js:736:9)
    at Object.exports.execFile (child_process.js:618:15)
    at exports.exec (child_process.js:589:18)
    at Object.Shaaa.certs (/home/shaaaaa/shaaaaa/current/shaaaaa.js:101:5)
    at Object.Shaaa.from (/home/shaaaaa/shaaaaa/current/shaaaaa.js:168:11)
    at /home/shaaaaa/shaaaaa/current/routes.js:22:13
    at Layer.handle [as handle_request] (/home/shaaaaa/shaaaaa/current/node_modules/express/lib/router/layer.js:82:5)
    at next (/home/shaaaaa/shaaaaa/current/node_modules/express/lib/router/route.js:110:13)
jonnybarnes commented 9 years ago

A properly rough hack to fix this would be a cron job that restarts the process every 24hrs.