{"action":"created","issue":{"url":"https://api.github.com/repos/hapijs/hapi/issues/3347","repository_url":"https://api.github.com/repos/hapijs/hapi","labels_url":"https://api.github.com/repos/hapijs/hapi/issues/3347/labels{/name}","comments_url":"https://api.github.com/repos/hapijs/hapi/issues/3347/comments","events_url":"https://api.github.com/repos/hapijs/hapi/issues/3347/events","html_url":"https://github.com/hapijs/hapi/issues/3347","id":176730902,"number":3347,"title":"Major performance issue with hapi.js 15.x","user":{"login":"lostthetrail","id":349754,"avatar_url":"https://avatars.githubusercontent.com/u/349754?v=3","gravatar_id":"","url":"https://api.github.com/users/lostthetrail","html_url":"https://github.com/lostthetrail","followers_url":"https://api.github.com/users/lostthetrail/followers","following_url":"https://api.github.com/users/lostthetrail/following{/other_user}","gists_url":"https://api.github.com/users/lostthetrail/gists{/gist_id}","starred_url":"https://api.github.com/users/lostthetrail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostthetrail/subscriptions","organizations_url":"https://api.github.com/users/lostthetrail/orgs","repos_url":"https://api.github.com/users/lostthetrail/repos","events_url":"https://api.github.com/users/lostthetrail/events{/privacy}","received_events_url":"https://api.github.com/users/lostthetrail/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-13T19:39:56Z","updated_at":"2016-09-19T12:48:24Z","closed_at":null,"body":"#### What are you trying to achieve or the steps to reproduce?\r\n\r\nUnder higher concurrency Hapi 15.x memory usage spikes and fails, where Hapi 14.x had no problem\r\n\r\n```js\r\n'use strict';\r\n\r\nconst Hapi = require('hapi');\r\nconst hoek = require('hoek');\r\n\r\nconst server = new Hapi.Server({\r\n    connections: {\r\n        router: {\r\n            stripTrailingSlash: true\r\n        }\r\n    }\r\n});\r\n\r\nserver.connection({\r\n    port: process.env.NODE_PORT || 8080,\r\n    host: process.env.HOSTNAME || '0.0.0.0',\r\n    routes: {\r\n        response: {\r\n            emptyStatusCode: 204\r\n        }\r\n    }\r\n});\r\n\r\nserver.route([\r\n    {\r\n        method: 'GET',\r\n        path: '/validate',\r\n        handler: function handle(request, reply) {\r\n            return reply({\r\n                validate: true\r\n            });\r\n        }\r\n    }\r\n]);\r\n\r\nserver.start(function handleServerStart(serverStartErr) {\r\n    hoek.assert(!serverStartErr, serverStartErr);\r\n    console.log(`Server running at: ${server.info.uri}`);\r\n});\r\n```\r\n\r\n```\r\nartillery quick --duration 60 --rate 100 -n 100 http://localhost:8080/validate\r\n```\r\n\r\n#### What was the result you received?\r\nWith Hapi 15.x, you will see a \"JavaScript heap out of memory\" and it will fail.\r\nWith Hapi 14.x, you will have a successful test and have zero errors.\r\n\r\n#### What did you expect?\r\nNo major failures and zero errors.\r\n\r\n#### Context\r\n\r\n* *node version*: 6.5.0 & 4.5.0\r\n* *hapi version*: 15.0.3\r\n* *os*: OSX & Centos\r\n* *any other relevant information*: I am aware this is a very high RPS to push through a server. But it is an attack vector. I also was able to replicate this with JMeter, so the load tool isn't important in this case. Just high concurrency and RPS.\r\n"},"comment":{"url":"https://api.github.com/repos/hapijs/hapi/issues/comments/247983655","html_url":"https://github.com/hapijs/hapi/issues/3347#issuecomment-247983655","issue_url":"https://api.github.com/repos/hapijs/hapi/issues/3347","id":247983655,"user":{"login":"igorkosta","id":6552306,"avatar_url":"https://avatars.githubusercontent.com/u/6552306?v=3","gravatar_id":"","url":"https://api.github.com/users/igorkosta","html_url":"https://github.com/igorkosta","followers_url":"https://api.github.com/users/igorkosta/followers","following_url":"https://api.github.com/users/igorkosta/following{/other_user}","gists_url":"https://api.github.com/users/igorkosta/gists{/gist_id}","starred_url":"https://api.github.com/users/igorkosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igorkosta/subscriptions","organizations_url":"https://api.github.com/users/igorkosta/orgs","repos_url":"https://api.github.com/users/igorkosta/repos","events_url":"https://api.github.com/users/igorkosta/events{/privacy}","received_events_url":"https://api.github.com/users/igorkosta/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T12:48:24Z","updated_at":"2016-09-19T12:48:24Z","body":"@genediazjr https://artillery.io/, I guess"}}
{"actor":{"display_login":"igorkosta"}}