-
Notifications
You must be signed in to change notification settings - Fork 39
Description
monitr works fine when I run jMeter with 1 user against our app. When I try to increase the number of concurrent users I rapidly get this error:
Error: Can't set headers after they are sent.
at ServerResponse.OutgoingMessage.setHeader (http.js:692:11)
at ServerResponse.res.setHeader (/x/web/STAGE2LP39/walletexpnodeweb/node_modules/express/node_modules/connect/lib/patch.js:63:22)
at next (/x/web/STAGE2LP39/walletexpnodeweb/node_modules/express/node_modules/connect/lib/proto.js:156:13)
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/express/lib/application.js:121:9
at next (/x/web/STAGE2LP39/walletexpnodeweb/node_modules/express/node_modules/connect/lib/proto.js:129:23)
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/async/lib/async.js:229:13
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/async/lib/async.js:116:25
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/async/lib/async.js:24:16
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/async/lib/async.js:226:17
at /x/web/STAGE2LP39/walletexpnodeweb/node_modules/async/lib/async.js:513:34
it appears to be due to the interception of the resp.end in lib/monitor.js
I don't know the timing considerations but I'm guessing there is some sort of timing issues around the patched intercept. Sorry I don't have much more to go on. Merely doing the require of monitr is enough to cause the problem. No monitor.start() needed.