Using build 5706 with a max Memory size of 256. I had a huge SQL file in my project - about 64 Meg. Because IDEA tried to parse it, it showed an out of memory error. Having IDEA parse my SQL file is not critical to the build. Unless there is some setting I do not know about, my suggestion is that IDEA avoids parsing certain non-project-critical files if they are large with respect to the configured VM memory limit.