{"action":"created","issue":{"url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/41","labels_url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/41/comments","events_url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/41/events","html_url":"https://github.com/pgbouncer/pgbouncer/issues/41","id":64035220,"number":41,"title":"FATAL @src/objects.c:298 in function put_in_order(): put_in_order: found existing elem","user":{"login":"petere","id":105543,"avatar_url":"https://avatars.githubusercontent.com/u/105543?v=3","gravatar_id":"","url":"https://api.github.com/users/petere","html_url":"https://github.com/petere","followers_url":"https://api.github.com/users/petere/followers","following_url":"https://api.github.com/users/petere/following{/other_user}","gists_url":"https://api.github.com/users/petere/gists{/gist_id}","starred_url":"https://api.github.com/users/petere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petere/subscriptions","organizations_url":"https://api.github.com/users/petere/orgs","repos_url":"https://api.github.com/users/petere/repos","events_url":"https://api.github.com/users/petere/events{/privacy}","received_events_url":"https://api.github.com/users/petere/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pgbouncer/pgbouncer/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-24T16:02:05Z","updated_at":"2015-11-17T18:30:05Z","closed_at":null,"body":"Under certain circumstances, when making a configuration change and reloading, pgbouncer will crash on the next suitable connection attempt.  (This issue is similar to http://permalink.gmane.org/gmane.comp.db.postgresql.pgbouncer.general/898, but not the same.  Reproducible in 1.5.4 and 1.6rc1.)\r\n\r\nSetup:\r\n\r\n- `pgbouncer.ini`\r\n\r\n```ini\r\n[databases]\r\n* =\r\n;test = user=postgres\r\n\r\n[pgbouncer]\r\nlogfile = pgbouncer.log\r\npidfile = pgbouncer.pid\r\n\r\nlisten_addr = 127.0.0.1\r\nlisten_port = 6432\r\n\r\nauth_type = trust\r\nauth_file = userlist.txt\r\n```\r\n\r\n- `userlist.txt`\r\n\r\n```\r\n\"postgres\" \"foo\"\r\n```\r\n\r\n- You need a regular PostgreSQL server running on port 5432 with a database called `test`.\r\n\r\n1. Start pgbouncer.\r\n2. Connect: `psql -h localhost -p 6432 -U postgres test`\r\n3. Disconnect\r\n4. Uncomment the `test` database entry in `pgbouncer.ini`.\r\n5. Reload: `kill -HUP $(cat pgbouncer.pid)`\r\n6. Connect again.\r\n\r\nNow pgbouncer will crash with this message:\r\n\r\n    FATAL @src/objects.c:298 in function put_in_order(): put_in_order: found existing elem\r\n\r\nIt is important that the newly added database entry contains a `user` parameter, otherwise it doesn't crash."},"comment":{"url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/comments/157461257","html_url":"https://github.com/pgbouncer/pgbouncer/issues/41#issuecomment-157461257","issue_url":"https://api.github.com/repos/pgbouncer/pgbouncer/issues/41","id":157461257,"user":{"login":"rsn86","id":521415,"avatar_url":"https://avatars.githubusercontent.com/u/521415?v=3","gravatar_id":"","url":"https://api.github.com/users/rsn86","html_url":"https://github.com/rsn86","followers_url":"https://api.github.com/users/rsn86/followers","following_url":"https://api.github.com/users/rsn86/following{/other_user}","gists_url":"https://api.github.com/users/rsn86/gists{/gist_id}","starred_url":"https://api.github.com/users/rsn86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsn86/subscriptions","organizations_url":"https://api.github.com/users/rsn86/orgs","repos_url":"https://api.github.com/users/rsn86/repos","events_url":"https://api.github.com/users/rsn86/events{/privacy}","received_events_url":"https://api.github.com/users/rsn86/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T18:30:05Z","updated_at":"2015-11-17T18:30:05Z","body":"After changing pool_size and max_db_connections and reloading:\r\n\r\nPgBouncer chrased with this message:\r\n\r\n2015-11-17 15:38:10.038 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 got var: user=postgres\r\n2015-11-17 15:38:10.038 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 got var: database=db_1g_ext_descanso\r\n2015-11-17 15:38:10.038 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 got var: client_encoding=UTF8\r\n2015-11-17 15:38:10.038 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 got var: DateStyle=ISO\r\n2015-11-17 15:38:10.038 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 got var: TimeZone=Brazil/East\r\n2015-11-17 15:38:10.039 15862 DEBUG C-0x24260d8: (nodb)/(nouser)@10.1.61.64:59991 ignoring startup parameter: extra_float_digits=2\r\n2015-11-17 15:38:10.040 15862 FATAL @src/objects.c:299 in function put_in_order(): put_in_order: found existing elem\r\n\r\nI changed from this:\r\n[databases]\r\ndb_1g_ext_descanso = port=5432 dbname=db_1grau_producao user=postgres password=md5... pool_size=180 reserve_pool=20 max_db_connections=200\r\n\r\nTo this:\r\n[databases]\r\ndb_1g_ext_descanso = port=5432 dbname=db_1grau_producao user=postgres password=md5... pool_size=200 reserve_pool=20 max_db_connections=220\r\n\r\nAnd: pkill -HUP pgbouncer"}}