Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Speeding up Tomcat in debug mode with Eclipse IDE

Running Tomcat through eclipse works fine in non-debug mode, but not in debug mode. When I try to start the Tomcat server in debug mode, the console output looks fine for a while, but then starts slowing down and eventually just stops, pegging the cpu at 100%. I don't think it's relevant, but just in case - here's the console output right about when it starts slowing down and eventually stopping (by stopping I mean no more console output, but still 100% cpu).

2009-09-02 14:35:30,859 INFO   NONE org.springframework.context.weaving.DefaultContextLoadTimeWeaver:72 - Found Spring's JVM agent for instrumentation 2009-09-02 14:35:49,562 INFO   NONE org.springframework.beans.factory.support.DefaultListableBeanFactory:414 - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@ed889d: defining beans [... 2009-09-02 14:37:31,031 INFO   NONE org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean:221 - Building JPA container EntityManagerFactory for persistence unit ... 

I tried everything I could think of to fix it:

  • cleanesd tomcat working directory
  • restarted eclipse
  • restarted Windows
  • refreshed/cleaned all projects

I first had this problem last week using eclipse ganymede. I had been running fine in debug-mode for several months prior to this issue. I didn't make any significant changes to our project that would cause this. Eventually, I upgraded to eclipse galileo which solved my problem. Now 2 days later, I'm having the same problem in galileo. Like I said it works fine in non-debug mode. Any help is much appreciated.

I should add that other things work in debug mode - for instance junit tests, so it is something specific to tomcat.

like image 279
andersonbd1 Avatar asked Sep 02 '09 18:09

andersonbd1


People also ask

Is running in debug mode slower?

debug code runs a lot slower than release - Visual Studio Feedback.

How do I change tomcat settings in Eclipse?

For configuring the tomcat server in eclipse IDE, click on servers tab at the bottom side of the IDE -> right click on blank area -> New -> Servers -> choose tomcat then its version -> next -> click on Browse button -> select the apache tomcat root folder previous to bin -> next -> addAll -> Finish.


1 Answers

I've gotten through the issue! Once I figured it out, I remember that this has happened before. I cleared all my breakpoints and it works fine. I have no idea why that would cause the outcome that is does, but it works.

like image 169
andersonbd1 Avatar answered Sep 17 '22 07:09

andersonbd1