{"action":"created","issue":{"url":"https://api.github.com/repos/gibiansky/IHaskell/issues/647","repository_url":"https://api.github.com/repos/gibiansky/IHaskell","labels_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/647/labels{/name}","comments_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/647/comments","events_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/647/events","html_url":"https://github.com/gibiansky/IHaskell/issues/647","id":139335462,"number":647,"title":"Too many open files","user":{"login":"acowley","id":124545,"avatar_url":"https://avatars.githubusercontent.com/u/124545?v=3","gravatar_id":"","url":"https://api.github.com/users/acowley","html_url":"https://github.com/acowley","followers_url":"https://api.github.com/users/acowley/followers","following_url":"https://api.github.com/users/acowley/following{/other_user}","gists_url":"https://api.github.com/users/acowley/gists{/gist_id}","starred_url":"https://api.github.com/users/acowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acowley/subscriptions","organizations_url":"https://api.github.com/users/acowley/orgs","repos_url":"https://api.github.com/users/acowley/repos","events_url":"https://api.github.com/users/acowley/events{/privacy}","received_events_url":"https://api.github.com/users/acowley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-08T17:07:22Z","updated_at":"2016-03-08T21:50:26Z","closed_at":null,"body":"I have a rather large Org document in emacs that I tie into IHaskell for source blocks. It's a really cool setup, but I do have one issue. \r\n\r\nOne can export the document through various backends, in this case I'm exporting my document to a reveal.js slide show. Since the IHaskell bits are all in one session, the export procedure evaluates every block from the top to make sure the output is consistent, but I find that after two or three exports, my IHaskell process has crashed. I then need to make sure the Emacs bits are killed because they don't do anything intelligent in response to the IHaskell process dying. At that point I can run another export operation, and IHaskell is restarted and all is well until the next time.\r\n\r\nThis is the only error message I can surface:\r\n`ihaskell: getWorkingDirectory: resource exhausted (Too many open files)`\r\n\r\nThe notebook does a fair bit of importing, and outputs a dozen or more images, so there is quite a bit of file IO.\r\n\r\nTL;DR: Does anyone have a guess as to how we might reduce the number of file handles IHaskell holds onto?"},"comment":{"url":"https://api.github.com/repos/gibiansky/IHaskell/issues/comments/193982576","html_url":"https://github.com/gibiansky/IHaskell/issues/647#issuecomment-193982576","issue_url":"https://api.github.com/repos/gibiansky/IHaskell/issues/647","id":193982576,"user":{"login":"acowley","id":124545,"avatar_url":"https://avatars.githubusercontent.com/u/124545?v=3","gravatar_id":"","url":"https://api.github.com/users/acowley","html_url":"https://github.com/acowley","followers_url":"https://api.github.com/users/acowley/followers","following_url":"https://api.github.com/users/acowley/following{/other_user}","gists_url":"https://api.github.com/users/acowley/gists{/gist_id}","starred_url":"https://api.github.com/users/acowley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acowley/subscriptions","organizations_url":"https://api.github.com/users/acowley/orgs","repos_url":"https://api.github.com/users/acowley/repos","events_url":"https://api.github.com/users/acowley/events{/privacy}","received_events_url":"https://api.github.com/users/acowley/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T21:50:26Z","updated_at":"2016-03-08T21:50:26Z","body":"Closing `readVariable` makes it so Jupyter doesn't get output from IHaskell :/\r\n\r\nI don't know why that is, but just running `jupyter console --kernel haskell` and entering an expression produces no output. So, that FD might be problematic, but closing it there does no good."}}