Home > eclipse, howto, open source, oss > Weird Eclipse behaviour

Weird Eclipse behaviour

No Gravatar

I use Eclipse as my primary IDE under Ubuntu Linux (now Hardy). IMHO it’s a great combination. Stable, fast, clean. But from time to time, as Eclipse evolves, and there are more and more plugins I use, I ran into strange erratic behaviour of Eclipse. First there were the nasty problem with PermGenSpece, and now this…

Occasionally Eclpise, or to be more precise some of the plugins fails with strange errors or behaves erratic.

I had the following problems:

  • Eclipse reports that it fail to read one file. So the project could not be compiled. I thought that I had file permission problems. But no. I opened the file from within Eclipse, changed it. Saved. Checked back from OS provided editor. All fine.
  • Eclipse fails to close the workspace correctly. – Configuration loss…
  • Strange errors when debugging. – As I realized this was due to partial compile/deploy as result of the core problem.

The core problem was actually this: “too many open files”… Fortunately the error “too many open files” was clear, and showed up few times. We can fix that. Check your system:

ulimit -a

Will show a line starting with “open files”. Mine was 1024. So we need more files. To do it change the

/etc/security/limits.conf file to contain the following lines:


* soft nofile 4096
* hard nofile 4096

You should tweak the values for your needs. But this should be more than enough. – Or at least it’s fine for me, may be even to much…

Restart your machine. – Or just re-login, as limits are related to PAM and login.

For more information about limits.conf…, well RTFM, as easy as “man limits.conf”, “man -s7 pam”, …

And the moral… :-) We’ll its not enough to know your primary tool (Eclipse)… you should be familiar with the environment (Ubuntu for me). And the other, for developers: always be prepared for the worst. – When did I last time checked if I ran out of some sort of “basic” resources?! Eeerh,… not quite often…

Share
  1. No comments yet.
  1. No trackbacks yet.