title: PermGen problems with Lift and Jetty
body: <p>I'm developing on the standard Lift platform (maven and jetty). I'm repeatedly (once every couple of days) getting this:</p>
  
  <pre><code>Exception in thread "7048009@qtp-3179125-12" java.lang.OutOfMemoryError: PermGen space
  2009-09-15 19:41:38.629::WARN:  handle failed
  java.lang.OutOfMemoryError: PermGen space
  </code></pre>
  
  <p>This is in my dev environment. It's not a problem because I can keep restarting the server. In deployment I'm not having these problems so it's not a real issue. I'm just curious.</p>
  
  <p>I don't know too much about the JVM. I think I'm correct in thinking that permanent generation memory is for things like classes and interned strings? What I remember is a bit mixed up with the .NET memory model...</p>
  
  <p>Any reason why this is happening? Are the defaults just crazily low? Is it to do with all the auxiliary objects that Scala has to create for Function objects and similar FP things? Every time I restart Jetty with newly written code (every few minutes) I imagine it re-loads classes etc. But even so, it cant' be that many can it? And shouldn't the JVM be able to deal with a large number of classes?</p>
  
  <p>Cheers</p>
  
  <p>Joe</p>