{"action":"created","issue":{"url":"https://api.github.com/repos/bitpay/insight-api/issues/298","repository_url":"https://api.github.com/repos/bitpay/insight-api","labels_url":"https://api.github.com/repos/bitpay/insight-api/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/bitpay/insight-api/issues/298/comments","events_url":"https://api.github.com/repos/bitpay/insight-api/issues/298/events","html_url":"https://github.com/bitpay/insight-api/issues/298","id":58843367,"number":298,"title":"Unhandled error in events.js","user":{"login":"lekanovic","id":3911096,"avatar_url":"https://avatars.githubusercontent.com/u/3911096?v=3","gravatar_id":"","url":"https://api.github.com/users/lekanovic","html_url":"https://github.com/lekanovic","followers_url":"https://api.github.com/users/lekanovic/followers","following_url":"https://api.github.com/users/lekanovic/following{/other_user}","gists_url":"https://api.github.com/users/lekanovic/gists{/gist_id}","starred_url":"https://api.github.com/users/lekanovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lekanovic/subscriptions","organizations_url":"https://api.github.com/users/lekanovic/orgs","repos_url":"https://api.github.com/users/lekanovic/repos","events_url":"https://api.github.com/users/lekanovic/events{/privacy}","received_events_url":"https://api.github.com/users/lekanovic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-25T03:03:06Z","updated_at":"2016-06-08T01:01:14Z","closed_at":"2016-06-08T01:01:14Z","body":"I have installed bitcoind(v0.9.4) and synced the whole block chain. The bitcoind is running in the background as a daemon and can be  acceessed using the bitcoin-cli command.\r\n\r\nI have now for several days tried to use the insight-api backend but I keep getting the same error. Each time I get the error I reset the database accordingly to the instructions \"utils/sync.js -D\". And restart the init process. It takes very long time to run the command \"node insight.js\" around 15-20 hours. And during this time I get a couple of  times the error \"{ '0': [Error: Could not connect to bitcoin via RPC: connect EMFILE] }\". But I am able to get around it by restarting the insight.js.\r\n\r\nSo the real problem that I cannot bypass is when the insight console progress is getting closer to [~95%] then I get this error.\r\n\r\ninfo: status: [96.923%]\r\nerror: IO error: /home/user/.insight/txs/478569.log: Too many open files\r\n[historic_sync] ABORTED with error: IO error: /home/user/.insight/txs/478569.log: Too many open files\r\n\r\nWhen I try to rerun the insight I get this error:\r\n\r\n$ node insight.js\r\n\r\n    ____           _       __    __     ___          _ \r\n   /  _/___  _____(_)___ _/ /_  / /_   /   |  ____  (_)\r\n   / // __ \\/ ___/ / __ `/ __ \\/ __/  / /| | / __ \\/ / \r\n _/ // / / (__  ) / /_/ / / / / /_   / ___ |/ /_/ / /  \r\n/___/_/ /_/____/_/\\__, /_/ /_/\\__/  /_/  |_/ .___/_/   \r\n                 /____/                   /_/           \r\n\r\n\t\t\t\t\t\tv0.2.12\r\n\r\ninfo: insight server listening on port 3000 in development mode\r\n{ '0': 'connecting to 127.0.0.1:8333' }\r\n\r\nevents.js:72\r\n        throw er; // Unhandled 'error' event\r\n              ^\r\nOpenError: Corruption: 2 missing files; e.g.: /home/user/.insight/txs/463401.ldb\r\n    at /home/user/projects/insight-api/node_modules/levelup/lib/levelup.js:118:34\r\n\r\nThis is 100% reproduceble for me and I have restarted to process 3 times with same result. Have anyone seen this error or do you know how to solve it?\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/bitpay/insight-api/issues/comments/224458564","html_url":"https://github.com/bitpay/insight-api/issues/298#issuecomment-224458564","issue_url":"https://api.github.com/repos/bitpay/insight-api/issues/298","id":224458564,"user":{"login":"braydonf","id":544777,"avatar_url":"https://avatars.githubusercontent.com/u/544777?v=3","gravatar_id":"","url":"https://api.github.com/users/braydonf","html_url":"https://github.com/braydonf","followers_url":"https://api.github.com/users/braydonf/followers","following_url":"https://api.github.com/users/braydonf/following{/other_user}","gists_url":"https://api.github.com/users/braydonf/gists{/gist_id}","starred_url":"https://api.github.com/users/braydonf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braydonf/subscriptions","organizations_url":"https://api.github.com/users/braydonf/orgs","repos_url":"https://api.github.com/users/braydonf/repos","events_url":"https://api.github.com/users/braydonf/events{/privacy}","received_events_url":"https://api.github.com/users/braydonf/received_events","type":"User","site_admin":false},"created_at":"2016-06-08T01:01:14Z","updated_at":"2016-06-08T01:01:14Z","body":"Outdated now. Please try running with latest version (leveldb is used in bitcoind directly)."}}
{"actor":{"display_login":"braydonf"}}