3

I am getting a python error in eclipse as this :

"IOError: File not found - ./FASTLEXICON.7 (Too many open files)".

Here is some background : In my java program I am using a .Jar library which is using python to do some things. I can't make changes to the jar file. But while running my program from eclipse I am getting this python error as above. I am using Eclipse Galileo on Ubuntu and my python version is 2.7.1+

can anybody help?

zw324
  • 26,764
  • 16
  • 85
  • 118
voidMainReturn
  • 3,339
  • 6
  • 38
  • 66
  • http://stackoverflow.com/questions/4386482/too-many-open-files-in-python – Patashu May 09 '13 at 03:19
  • @patashu : unlike what is mentioned in the link you posted, I can't edit any of the code inside .jar. Neither can I edit the python files which the jar is using. So if there is anything we could do externally? – voidMainReturn May 09 '13 at 03:22
  • Hmm, I'm not sure, that makes your problem more interesting. – Patashu May 09 '13 at 03:23

1 Answers1

1

You need to increase the OS support for number of open files.

in linux you can use to view current limit

cat /proc/sys/fs/file-max

Use ulimit to change the number

http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

Edit: To make limits permenent http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/

Sajith Silva
  • 823
  • 1
  • 13
  • 24
  • Thanks. This is another helpful link I found : http://stackoverflow.com/questions/34588/how-do-i-change-the-number-of-open-files-limit-in-linux – voidMainReturn May 09 '13 at 03:43
  • Still no luck. In the description here it says that ulimit is for increasing number of open files for the current shell. I am using eclipse, does that make it somewhat different? – voidMainReturn May 09 '13 at 21:55
  • Yes. ulimit will reset after reboot and it will effect only for the current terminal. To make it permanent I believe you need to edit /etc/security/limits.conf – Sajith Silva May 13 '13 at 04:49
  • still facing the same problem. This problem is interesting though but I didn't find any solution whatsoever, online. – voidMainReturn May 15 '13 at 00:14