{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/398","repository_url":"https://api.github.com/repos/pouchdb/express-pouchdb","labels_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/398/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/398/comments","events_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/398/events","html_url":"https://github.com/pouchdb/express-pouchdb/issues/398","id":189684495,"number":398,"title":"/dbs/<dbname>/_changes memory leak","user":{"login":"bjendyk","id":9347541,"avatar_url":"https://avatars.githubusercontent.com/u/9347541?v=3","gravatar_id":"","url":"https://api.github.com/users/bjendyk","html_url":"https://github.com/bjendyk","followers_url":"https://api.github.com/users/bjendyk/followers","following_url":"https://api.github.com/users/bjendyk/following{/other_user}","gists_url":"https://api.github.com/users/bjendyk/gists{/gist_id}","starred_url":"https://api.github.com/users/bjendyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjendyk/subscriptions","organizations_url":"https://api.github.com/users/bjendyk/orgs","repos_url":"https://api.github.com/users/bjendyk/repos","events_url":"https://api.github.com/users/bjendyk/events{/privacy}","received_events_url":"https://api.github.com/users/bjendyk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-16T12:06:35Z","updated_at":"2016-12-07T08:13:38Z","closed_at":"2016-11-30T18:28:21Z","body":"When tested with apache bench tool using the following command:\r\n\r\nab -k -c 10 -n 10000 http://localhost:port/dbs/<db_name>/_changes\r\n\r\nthe heap usage grows continuously over time. I have included **memwatch-next** module to record some memory usage statistics. During this test (10000 requests), the heap size (\"current_base\" as reported by memwatch in \"stats\" event) starts with something around 30 MB, and ends somewhere around 130 MB after 154 garbage collection operations. I'm including the captured values (X being the consecutive number of garbage collection, Y being the current heap size) as a CSV to plot them and observe the leak as a reference.\r\n\r\nexpress-pouchdb version: 2.1.0\r\nnode.js version: 5.10.1\r\nexpress version: 4.14.0\r\npouchdb version: 6.0.5\r\n\r\nSee https://github.com/bjendyk/express-pouchdb-memleak app that helps to reproduce the problem.\r\n\r\nStats recorded by memwatch:\r\n\r\nnum_of_gc, current_base\r\n1,31206792\r\n2,28568336\r\n3,38428640\r\n4,25790680\r\n5,42686912\r\n6,49511040\r\n7,28185576\r\n8,51364960\r\n9,29323784\r\n10,52470064\r\n11,54629264\r\n12,31164792\r\n13,57209752\r\n14,32415744\r\n15,57673592\r\n16,55494728\r\n17,33849592\r\n18,50667872\r\n19,54537696\r\n20,56950304\r\n21,58198880\r\n22,63423744\r\n23,39145240\r\n24,61749440\r\n25,40337888\r\n26,56256088\r\n27,39856192\r\n28,63509208\r\n29,40758576\r\n30,60000352\r\n31,42044688\r\n32,61730920\r\n33,43065792\r\n34,62966336\r\n35,69602512\r\n36,75138584\r\n37,76913808\r\n38,78103848\r\n39,46804392\r\n40,60956352\r\n41,67628552\r\n42,48323568\r\n43,64079808\r\n44,71439592\r\n45,79203792\r\n46,52024488\r\n47,69887096\r\n48,53387112\r\n49,72078336\r\n50,54417904\r\n51,73670072\r\n52,55198360\r\n53,75348632\r\n54,82796680\r\n55,56299664\r\n56,71773920\r\n57,87209752\r\n58,58834576\r\n59,75504936\r\n60,59225656\r\n61,77072208\r\n62,78729952\r\n63,60899688\r\n64,80997416\r\n65,61999920\r\n66,81186184\r\n67,61822824\r\n68,83539840\r\n69,63260584\r\n70,83565456\r\n71,85331720\r\n72,64219744\r\n73,85082672\r\n74,65488120\r\n75,90123952\r\n76,66603496\r\n77,91973000\r\n78,67410384\r\n79,93429616\r\n80,93942656\r\n81,97138632\r\n82,70628056\r\n83,94738808\r\n84,70173216\r\n85,97763072\r\n86,94758744\r\n87,72641152\r\n88,88965088\r\n89,72597432\r\n90,91951040\r\n91,74447192\r\n92,92560376\r\n93,74609264\r\n94,91009024\r\n95,102412344\r\n96,101097824\r\n97,76836520\r\n98,98351528\r\n99,78205880\r\n100,95485368\r\n101,78078336\r\n102,96942152\r\n103,79611424\r\n104,97966560\r\n105,80352192\r\n106,102432664\r\n107,107000320\r\n108,81330560\r\n109,101571104\r\n110,83077800\r\n111,102097000\r\n112,82995576\r\n113,103731632\r\n114,83949008\r\n115,104518776\r\n116,112659760\r\n117,85658232\r\n118,107206256\r\n119,87117720\r\n120,108367176\r\n121,116743040\r\n122,89202736\r\n123,110789448\r\n124,89620464\r\n125,111552504\r\n126,111816456\r\n127,91092480\r\n128,117858328\r\n129,91777768\r\n130,119158232\r\n131,93611328\r\n132,120514800\r\n133,94432648\r\n134,113516248\r\n135,95165552\r\n136,114461784\r\n137,96148096\r\n138,116186720\r\n139,120682808\r\n140,98270288\r\n141,127296720\r\n142,99196064\r\n143,128064008\r\n144,98996344\r\n145,121097184\r\n146,100856000\r\n147,130779880\r\n148,101012776\r\n149,124165968\r\n150,103021224\r\n151,125060192\r\n152,103308584\r\n153,126713384\r\n154,134001336"},"comment":{"url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/comments/265383530","html_url":"https://github.com/pouchdb/express-pouchdb/issues/398#issuecomment-265383530","issue_url":"https://api.github.com/repos/pouchdb/express-pouchdb/issues/398","id":265383530,"user":{"login":"bjendyk","id":9347541,"avatar_url":"https://avatars.githubusercontent.com/u/9347541?v=3","gravatar_id":"","url":"https://api.github.com/users/bjendyk","html_url":"https://github.com/bjendyk","followers_url":"https://api.github.com/users/bjendyk/followers","following_url":"https://api.github.com/users/bjendyk/following{/other_user}","gists_url":"https://api.github.com/users/bjendyk/gists{/gist_id}","starred_url":"https://api.github.com/users/bjendyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjendyk/subscriptions","organizations_url":"https://api.github.com/users/bjendyk/orgs","repos_url":"https://api.github.com/users/bjendyk/repos","events_url":"https://api.github.com/users/bjendyk/events{/privacy}","received_events_url":"https://api.github.com/users/bjendyk/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T08:13:38Z","updated_at":"2016-12-07T08:13:38Z","body":"It seems that the problem is not fixed. I updated to 2.1.1 and ran https://github.com/bjendyk/express-pouchdb-memleak. The heap size growth is even bigger than using 2.1.0."}}
{"actor":{"display_login":"bjendyk"}}