{"action":"opened","issue":{"url":"https://api.github.com/repos/syndesisio/syndesis/issues/2015","repository_url":"https://api.github.com/repos/syndesisio/syndesis","labels_url":"https://api.github.com/repos/syndesisio/syndesis/issues/2015/labels{/name}","comments_url":"https://api.github.com/repos/syndesisio/syndesis/issues/2015/comments","events_url":"https://api.github.com/repos/syndesisio/syndesis/issues/2015/events","html_url":"https://github.com/syndesisio/syndesis/issues/2015","id":305527885,"number":2015,"title":"Leaking database connections","user":{"login":"zregvart","id":1306050,"avatar_url":"https://avatars0.githubusercontent.com/u/1306050?v=4","gravatar_id":"","url":"https://api.github.com/users/zregvart","html_url":"https://github.com/zregvart","followers_url":"https://api.github.com/users/zregvart/followers","following_url":"https://api.github.com/users/zregvart/following{/other_user}","gists_url":"https://api.github.com/users/zregvart/gists{/gist_id}","starred_url":"https://api.github.com/users/zregvart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zregvart/subscriptions","organizations_url":"https://api.github.com/users/zregvart/orgs","repos_url":"https://api.github.com/users/zregvart/repos","events_url":"https://api.github.com/users/zregvart/events{/privacy}","received_events_url":"https://api.github.com/users/zregvart/received_events","type":"User","site_admin":false},"labels":[{"id":751428603,"url":"https://api.github.com/repos/syndesisio/syndesis/labels/cat/bug","name":"cat/bug","color":"e08891","default":false},{"id":751428710,"url":"https://api.github.com/repos/syndesisio/syndesis/labels/group/server","name":"group/server","color":"c2e0c6","default":false},{"id":751428832,"url":"https://api.github.com/repos/syndesisio/syndesis/labels/prio/p1","name":"prio/p1","color":"e68b8a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-15T12:15:25Z","updated_at":"2018-03-15T12:15:25Z","closed_at":null,"author_association":"COLLABORATOR","body":"## This is a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[ ] Feature request\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Documentation issue or request\r\n</code></pre>\r\n\r\n\r\n## The problem\r\n\r\nAt some point I got an error from the API:\r\n\r\n```json\r\n{\"errorCode\":500,\"userMsg\":\"Please contact the administrator and file a bug report\",\"developerMsg\":\"Internal Server Exception. org.postgresql.util.PSQLException: FATAL: remaining connection slots are reserved for non-replication superuser connections\"}\r\n```\r\n\r\nWhen I looked into the database pod I found a number of processes as `idle in transaction`.\r\n\r\n<details>\r\n<summary>syndesis-db process list</summary>\r\n<pre>\r\nsh-4.2$ ps auxww\r\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\r\n1000060+     1  0.0  0.3 171452 14288 ?        Ss   Mar12   0:53 postgres\r\n1000060+   103  0.0  0.0  95020  3692 ?        Ss   Mar12   0:02 postgres: logger process  \r\n1000060+   105  0.0  1.3 171572 54540 ?        Ss   Mar12   0:04 postgres: checkpointer process  \r\n1000060+   106  0.0  0.1 171452  4800 ?        Ss   Mar12   0:03 postgres: writer process  \r\n1000060+   107  0.0  0.1 171452  6484 ?        Ss   Mar12   0:03 postgres: wal writer process  \r\n1000060+   108  0.0  0.1 171872  6232 ?        Ss   Mar12   0:09 postgres: autovacuum launcher process  \r\n1000060+   109  0.0  0.0  97272  3940 ?        Ss   Mar12   0:35 postgres: stats collector process  \r\n1000060+  1279  0.0  0.3 172656 13044 ?        Ss   11:02   0:00 postgres: syndesis syndesis 172.17.0.2(47134) idle in transaction\r\n1000060+  1315  0.0  0.5 172732 22840 ?        Ss   11:03   0:00 postgres: syndesis syndesis 172.17.0.2(47288) idle in transaction\r\n1000060+  1316  0.0  0.5 172704 20788 ?        Ss   11:03   0:00 postgres: syndesis syndesis 172.17.0.2(47290) idle in transaction\r\n1000060+  1350  0.0  0.6 172752 26604 ?        Ss   11:03   0:00 postgres: syndesis syndesis 172.17.0.2(47470) idle in transaction\r\n1000060+  1464  0.0  0.4 172784 16584 ?        Ss   11:05   0:00 postgres: syndesis syndesis 172.17.0.2(48060) idle in transaction\r\n1000060+  1567  0.0  0.5 172708 23552 ?        Ss   11:06   0:00 postgres: syndesis syndesis 172.17.0.2(48582) idle in transaction\r\n1000060+  1751  0.0  0.5 172716 23620 ?        Ss   11:09   0:00 postgres: syndesis syndesis 172.17.0.2(49418) idle in transaction\r\n1000060+  1855  0.0  0.5 172708 23548 ?        Ss   11:10   0:00 postgres: syndesis syndesis 172.17.0.2(49888) idle in transaction\r\n1000060+  1900  0.0  0.5 172708 23548 ?        Ss   11:11   0:00 postgres: syndesis syndesis 172.17.0.2(50130) idle in transaction\r\n1000060+  1981  0.0  0.5 172708 23548 ?        Ss   11:12   0:00 postgres: syndesis syndesis 172.17.0.2(50550) idle in transaction\r\n1000060+  1993  0.0  0.5 172708 23544 ?        Ss   11:12   0:00 postgres: syndesis syndesis 172.17.0.2(50642) idle in transaction\r\n1000060+  2006  0.0  0.5 172708 23544 ?        Ss   11:13   0:00 postgres: syndesis syndesis 172.17.0.2(50740) idle in transaction\r\n1000060+  2197  0.0  0.5 172708 23544 ?        Ss   11:15   0:00 postgres: syndesis syndesis 172.17.0.2(51596) idle in transaction\r\n1000060+  2220  0.0  0.5 172708 23548 ?        Ss   11:16   0:00 postgres: syndesis syndesis 172.17.0.2(51814) idle in transaction\r\n1000060+  2232  0.0  0.6 172756 27756 ?        Ss   11:16   0:00 postgres: syndesis syndesis 172.17.0.2(51894) idle in transaction\r\n1000060+  2280  0.0  0.6 172760 27588 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52116) idle in transaction\r\n1000060+  2292  0.0  0.3 172656 12992 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52130) idle in transaction\r\n1000060+  2293  0.0  0.6 172760 28064 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52138) idle in transaction\r\n1000060+  2294  0.0  0.3 172788 13000 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52166) idle in transaction\r\n1000060+  2307  0.0  0.6 172708 26096 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52238) idle in transaction\r\n1000060+  2309  0.0  0.7 172760 28892 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52290) idle in transaction\r\n1000060+  2321  0.0  0.7 172756 31684 ?        Ss   11:17   0:00 postgres: syndesis syndesis 172.17.0.2(52298) idle in transaction\r\n1000060+  2403  0.0  0.7 172732 31984 ?        Ss   11:18   0:00 postgres: syndesis syndesis 172.17.0.2(52744) idle in transaction\r\n1000060+  2448  0.0  0.7 172708 29660 ?        Ss   11:19   0:00 postgres: syndesis syndesis 172.17.0.2(53006) idle in transaction\r\n1000060+  2496  0.0  0.8 172748 33828 ?        Ss   11:20   0:00 postgres: syndesis syndesis 172.17.0.2(53256) idle in transaction\r\n1000060+  2587  0.0  0.8 172740 34344 ?        Ss   11:21   0:00 postgres: syndesis syndesis 172.17.0.2(53724) idle in transaction\r\n1000060+  2589  0.0  0.7 172708 30916 ?        Ss   11:21   0:00 postgres: syndesis syndesis 172.17.0.2(53766) idle in transaction\r\n1000060+  2647  0.0  0.4 172796 16540 ?        Ss   11:22   0:00 postgres: syndesis syndesis 172.17.0.2(54090) idle in transaction\r\n1000060+  2659  0.0  0.7 172708 31956 ?        Ss   11:22   0:00 postgres: syndesis syndesis 172.17.0.2(54148) idle in transaction\r\n1000060+  2900  0.0  0.4 172796 16540 ?        Ss   11:25   0:00 postgres: syndesis syndesis 172.17.0.2(55246) idle in transaction\r\n1000060+  2967  0.0  0.8 172708 33816 ?        Ss   11:26   0:00 postgres: syndesis syndesis 172.17.0.2(55680) idle in transaction\r\n1000060+  2968  0.0  0.3 172788 12968 ?        Ss   11:26   0:00 postgres: syndesis syndesis 172.17.0.2(55726) idle in transaction\r\n1000060+  3025  0.0  0.4 172664 16336 ?        Ss   11:27   0:00 postgres: syndesis syndesis 172.17.0.2(56142) idle in transaction\r\n1000060+  3026  0.0  0.8 172740 35800 ?        Ss   11:27   0:00 postgres: syndesis syndesis 172.17.0.2(56144) idle in transaction\r\n1000060+  3119  0.0  0.8 172736 36092 ?        Ss   11:28   0:00 postgres: syndesis syndesis 172.17.0.2(56682) idle in transaction\r\n1000060+  3120  0.0  0.3 172788 12972 ?        Ss   11:29   0:00 postgres: syndesis syndesis 172.17.0.2(56706) idle in transaction\r\n1000060+  3132  0.0  0.9 172736 37144 ?        Ss   11:29   0:00 postgres: syndesis syndesis 172.17.0.2(56730) idle in transaction\r\n1000060+  3133  0.0  0.3 172788 12916 ?        Ss   11:29   0:00 postgres: syndesis syndesis 172.17.0.2(56754) idle in transaction\r\n1000060+  3145  0.0  0.9 172736 37528 ?        Ss   11:29   0:00 postgres: syndesis syndesis 172.17.0.2(56782) idle in transaction\r\n1000060+  3146  0.0  0.8 172716 35504 ?        Ss   11:29   0:00 postgres: syndesis syndesis 172.17.0.2(56806) idle in transaction\r\n1000060+  3260  0.0  0.8 172700 35444 ?        Ss   11:31   0:00 postgres: syndesis syndesis 172.17.0.2(57390) idle in transaction\r\n1000060+  3261  0.0  0.9 172764 38748 ?        Ss   11:31   0:00 postgres: syndesis syndesis 172.17.0.2(57391) idle in transaction\r\n1000060+  3306  0.0  0.8 172700 35924 ?        Ss   11:31   0:00 postgres: syndesis syndesis 172.17.0.2(57620) idle in transaction\r\n1000060+  3330  0.0  0.9 172732 38316 ?        Ss   11:32   0:00 postgres: syndesis syndesis 172.17.0.2(57822) idle in transaction\r\n1000060+  3331  0.0  0.8 172700 35928 ?        Ss   11:32   0:00 postgres: syndesis syndesis 172.17.0.2(57828) idle in transaction\r\n1000060+  3413  0.0  0.8 172700 36388 ?        Ss   11:33   0:00 postgres: syndesis syndesis 172.17.0.2(58264) idle in transaction\r\n1000060+  3425  0.0  0.9 172756 38840 ?        Ss   11:33   0:00 postgres: syndesis syndesis 172.17.0.2(58306) idle in transaction\r\n1000060+  3526  0.0  0.9 172724 36904 ?        Ss   11:34   0:00 postgres: syndesis syndesis 172.17.0.2(58870) idle in transaction\r\n1000060+  3549  0.0  1.0 172756 43064 ?        Ss   11:35   0:01 postgres: syndesis syndesis 172.17.0.2(58970) idle in transaction\r\n1000060+  3630  0.0  1.0 172764 43368 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59348) idle in transaction\r\n1000060+  3642  0.0  0.3 172660 12968 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59362) idle in transaction\r\n1000060+  3653  0.0  1.0 172764 44220 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59414) idle in transaction\r\n1000060+  3655  0.0  0.3 172660 12968 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59438) idle in transaction\r\n1000060+  3667  0.0  1.1 172764 45416 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59462) idle in transaction\r\n1000060+  3668  0.0  1.0 172708 43204 ?        Ss   11:36   0:00 postgres: syndesis syndesis 172.17.0.2(59486) idle in transaction\r\n1000060+  3760  0.0  1.0 172708 43156 ?        Ss   11:38   0:00 postgres: syndesis syndesis 172.17.0.2(59914) idle in transaction\r\n1000060+  3772  0.0  1.0 172708 43156 ?        Ss   11:38   0:00 postgres: syndesis syndesis 172.17.0.2(60002) idle in transaction\r\n1000060+  3785  0.0  1.0 172708 43160 ?        Ss   11:38   0:00 postgres: syndesis syndesis 172.17.0.2(60118) idle in transaction\r\n1000060+  3821  0.0  1.0 172708 43156 ?        Ss   11:38   0:00 postgres: syndesis syndesis 172.17.0.2(60292) idle in transaction\r\n1000060+  3833  0.0  1.0 172708 43156 ?        Ss   11:39   0:00 postgres: syndesis syndesis 172.17.0.2(60362) idle in transaction\r\n1000060+  3845  0.0  1.0 172708 43156 ?        Ss   11:39   0:00 postgres: syndesis syndesis 172.17.0.2(60462) idle in transaction\r\n1000060+  3869  0.0  1.1 172740 48212 ?        Ss   11:39   0:00 postgres: syndesis syndesis 172.17.0.2(60674) idle in transaction\r\n1000060+  3904  0.0  1.2 172756 48808 ?        Ss   11:40   0:00 postgres: syndesis syndesis 172.17.0.2(60788) idle in transaction\r\n1000060+  3905  0.0  1.1 172708 46436 ?        Ss   11:40   0:00 postgres: syndesis syndesis 172.17.0.2(60814) idle in transaction\r\n1000060+  3940  0.0  1.1 172708 46436 ?        Ss   11:40   0:00 postgres: syndesis syndesis 172.17.0.2(32778) idle in transaction\r\n1000060+  3953  0.0  1.2 172740 51396 ?        Ss   11:40   0:00 postgres: syndesis syndesis 172.17.0.2(32896) idle in transaction\r\n1000060+  4213  0.0  1.1 172704 48448 ?        Ss   11:44   0:00 postgres: syndesis syndesis 172.17.0.2(34104) idle in transaction\r\n1000060+  4214  0.0  1.1 172704 48516 ?        Ss   11:44   0:00 postgres: syndesis syndesis 172.17.0.2(34106) idle in transaction\r\n1000060+  4240  0.0  1.1 172704 48448 ?        Ss   11:45   0:00 postgres: syndesis syndesis 172.17.0.2(34278) idle in transaction\r\n1000060+  4283  0.0  1.1 172704 48448 ?        Ss   11:45   0:00 postgres: syndesis syndesis 172.17.0.2(34586) idle in transaction\r\n1000060+  4296  0.0  1.1 172700 48444 ?        Ss   11:45   0:00 postgres: syndesis syndesis 172.17.0.2(34654) idle in transaction\r\n1000060+  4469  0.0  1.2 172744 52184 ?        Ss   11:48   0:00 postgres: syndesis syndesis 172.17.0.2(35392) idle in transaction\r\n1000060+  4470  0.0  1.2 172704 49260 ?        Ss   11:48   0:00 postgres: syndesis syndesis 172.17.0.2(35400) idle in transaction\r\n1000060+  4518  0.0  1.2 172704 49260 ?        Ss   11:48   0:00 postgres: syndesis syndesis 172.17.0.2(35714) idle in transaction\r\n1000060+  4531  0.0  1.2 172704 49256 ?        Ss   11:49   0:00 postgres: syndesis syndesis 172.17.0.2(35834) idle in transaction\r\n1000060+  4920  0.0  1.2 172704 49256 ?        Ss   11:54   0:00 postgres: syndesis syndesis 172.17.0.2(37534) idle in transaction\r\n1000060+  4932  0.1  1.3 172752 54480 ?        Ss   11:54   0:00 postgres: syndesis syndesis 172.17.0.2(37586) idle in transaction\r\n1000060+  4956  0.0  1.2 172704 51564 ?        Ss   11:55   0:00 postgres: syndesis syndesis 172.17.0.2(37704) idle in transaction\r\n1000060+  5013  0.0  1.3 172752 54708 ?        Ss   11:56   0:00 postgres: syndesis syndesis 172.17.0.2(38074) idle in transaction\r\n1000060+  5071  0.1  1.3 172736 55336 ?        Ss   11:56   0:00 postgres: syndesis syndesis 172.17.0.2(38296) idle in transaction\r\n1000060+  5072  0.0  1.3 172720 53472 ?        Ss   11:56   0:00 postgres: syndesis syndesis 172.17.0.2(38298) idle in transaction\r\n1000060+  5234  0.0  1.3 172712 53420 ?        Ss   11:59   0:00 postgres: syndesis syndesis 172.17.0.2(39052) idle in transaction\r\n1000060+  5247  0.0  1.3 172768 56100 ?        Ss   11:59   0:00 postgres: syndesis syndesis 172.17.0.2(39150) idle in transaction\r\n1000060+  5271  0.1  1.4 172652 57548 ?        Ss   11:59   0:00 postgres: syndesis syndesis 172.17.0.2(39244) idle in transaction\r\n1000060+  5413  0.2  1.3 172720 54064 ?        Ss   12:01   0:00 postgres: syndesis syndesis 172.17.0.2(39922) idle in transaction\r\n1000060+  5462  0.0  0.3 172800 13108 ?        Ss   12:02   0:00 postgres: syndesis syndesis 172.17.0.2(40200) idle in transaction\r\n1000060+  5597  0.0  0.0  11792  2776 ?        Ss+  12:04   0:00 /bin/sh\r\n1000060+  5686  0.2  0.0  11784  2772 ?        Ss   12:05   0:00 /bin/sh\r\n1000060+  5718  0.0  0.0  47468  3212 ?        R+   12:05   0:00 ps auxww\r\n1000060+  8937  0.0  0.0  11784  2788 ?        Ss   Mar12   0:00 /bin/sh\r\n1000060+  8946  0.0  0.1  80496  5656 ?        S+   Mar12   0:00 psql -U sampledb\r\n1000060+  8947  0.0  0.3 173280 13036 ?        Ss   Mar12   0:00 postgres: sampledb sampledb [local] idle\r\n1000060+ 30799  0.0  0.5 172732 22360 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34350) idle in transaction\r\n1000060+ 30800  0.0  0.3 172776 12860 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34352) idle in transaction\r\n1000060+ 30801  0.0  0.5 172732 22412 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34354) idle in transaction\r\n1000060+ 30802  0.0  0.3 172656 12640 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34356) idle in transaction\r\n1000060+ 30803  0.0  0.6 172728 24544 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34358) idle in transaction\r\n1000060+ 30804  0.0  0.3 172684 16040 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34360) idle in transaction\r\n1000060+ 30805  0.0  0.5 172736 22488 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34362) idle in transaction\r\n1000060+ 30806  0.0  0.5 172736 20960 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34364) idle in transaction\r\n1000060+ 30807  0.0  0.4 172644 16576 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34366) idle in transaction\r\n1000060+ 30808  0.0  0.4 173424 17204 ?        Ss   10:19   0:00 postgres: syndesis syndesis 172.17.0.2(34368) idle in transaction\r\n</pre>\r\n</details>\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be, enlistin gthe acceptance criteria. -->\r\n\r\nNot leak connections, OBVS.\r\n\r\n## Screenshot\r\n\r\n![leeks01-lg](https://user-images.githubusercontent.com/1306050/37462523-8a77e00e-2852-11e8-8cda-bb89b29c4158.jpg)\r\n\r\n## API Endpoints and Schemas\r\n<!--\r\nFor features or bugfixes entailing data exchanges between the UI and the REST API,\r\nenlist the different endpoints available and the payload/response schemas.\r\n-->\r\nI was fiddling with icon upload, perhaps something under `/api/v1/connectors/{id}/icon`\r\n\r\n## Tasks involved / Steps to Reproduce\r\n<!--\r\nEnlist all the acceptance criteria for new features or the steps required to reproduce the bug/regression reported.\r\n-->\r\n_(theory)_\r\n1. Create API connector\r\n2. Try changing the icon a bunch of times\r\n"}}
{"actor":{"display_login":"zregvart"}}