{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/457","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/457/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/457/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/457/events","html_url":"https://github.com/facebook/rocksdb/issues/457","id":54155226,"number":457,"title":"\"Too many open files\" error","user":{"login":"neutronsharc","id":5789540,"avatar_url":"https://avatars.githubusercontent.com/u/5789540?v=3","gravatar_id":"","url":"https://api.github.com/users/neutronsharc","html_url":"https://github.com/neutronsharc","followers_url":"https://api.github.com/users/neutronsharc/followers","following_url":"https://api.github.com/users/neutronsharc/following{/other_user}","gists_url":"https://api.github.com/users/neutronsharc/gists{/gist_id}","starred_url":"https://api.github.com/users/neutronsharc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neutronsharc/subscriptions","organizations_url":"https://api.github.com/users/neutronsharc/orgs","repos_url":"https://api.github.com/users/neutronsharc/repos","events_url":"https://api.github.com/users/neutronsharc/events{/privacy}","received_events_url":"https://api.github.com/users/neutronsharc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-13T06:25:41Z","updated_at":"2015-01-13T19:26:09Z","closed_at":null,"body":"Hello RocksDB team,\r\n\r\nI wrote about 3000 objects to RocksDB, and starts seeing errors:\r\nfailed: IO error: /tmp/rdb1/001047.sst: Too many open files\r\nAfter this error all future writes fail and no more data is saved.\r\n\r\nEach obj is 1KB, key size is 10 bytes.\r\nulimit -a shows my file open limit is 32768, so I don't think it is because of my file handle limit. \r\n\r\nHere is my rocksdb option:\r\nrocksdb_options_set_create_if_missing(db->options, 1);\r\nrocksdb_options_set_compression(db->options, 0);                                                                                    rocksdb_options_set_max_open_files(db->options, 1000000);     /// big enough...\r\n\r\n Any clues about what can be wrong?  Thanks!\r\n\r\ncore file size          (blocks, -c) unlimited\r\ndata seg size           (kbytes, -d) unlimited\r\nscheduling priority             (-e) 0\r\nfile size               (blocks, -f) unlimited\r\npending signals                 (-i) 59474\r\nmax locked memory       (kbytes, -l) 64\r\nmax memory size         (kbytes, -m) unlimited\r\nopen files                      (-n) 32768\r\npipe size            (512 bytes, -p) 8\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/69803230","html_url":"https://github.com/facebook/rocksdb/issues/457#issuecomment-69803230","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/457","id":69803230,"user":{"login":"neutronsharc","id":5789540,"avatar_url":"https://avatars.githubusercontent.com/u/5789540?v=3","gravatar_id":"","url":"https://api.github.com/users/neutronsharc","html_url":"https://github.com/neutronsharc","followers_url":"https://api.github.com/users/neutronsharc/followers","following_url":"https://api.github.com/users/neutronsharc/following{/other_user}","gists_url":"https://api.github.com/users/neutronsharc/gists{/gist_id}","starred_url":"https://api.github.com/users/neutronsharc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neutronsharc/subscriptions","organizations_url":"https://api.github.com/users/neutronsharc/orgs","repos_url":"https://api.github.com/users/neutronsharc/repos","events_url":"https://api.github.com/users/neutronsharc/events{/privacy}","received_events_url":"https://api.github.com/users/neutronsharc/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T19:26:09Z","updated_at":"2015-01-13T19:26:09Z","body":"Thanks Igor!  It turns out the app code changes the rlimit on file numbers to be lower than rocksdb option.  After changing rlimit the problem is gone.  Thanks for replying!"}}