title: Tomcat 7 Spring App IntelliJ IDEA 10.5 OutOfMemoryError: PermGen space
body: <p>Not sure who is responsible for this error:</p>
  
  <pre><code>Exception in thread "main" java.lang.OutOfMemoryError: PermGen space
  </code></pre>
  
  <p>This error occurs whey I try to run my spring web app in Debug mode from the IntelliJ IDEA 10.5 (my project is maven format project).</p>
  
  <p>When running the same application from the standalone Tomcat 7 Web server (put war into webapps folder) it works fine. Also from mvn clean install t7:run-forked application also works fine.</p>
  
  <p>My app is Spring JPA application using Hibernate as JPA provider, c3p0 is used for connection pooling (switched to it from bonecp, thought that the bonecp was the cause of this error, but it is still reproducible with c3p0 too), Spring TomcatInstrumentationLoading is used for JPA support on Tomcat.</p>
  
  <p>My OS is Debian, Linux.</p>