62

By default when using a webapp server in Eclipse Web Tools, the server startup will fail after a timeout of 45 seconds. I can increase this timeout in the server instance properties, but I don't see a way to disable the timeout entirely (useful when debugging application startup). Is there a way to do this?

Seth Weiner
  • 2,999
  • 5
  • 26
  • 14
  • possible duplicate of [increase server timeout in eclipse](http://stackoverflow.com/questions/12825288/increase-server-timeout-in-eclipse) – wrahool Mar 25 '14 at 12:50

8 Answers8

99

enter image description here In Eclipse Indigo, you can edit the default timeout by double-clicking on the server in the "servers" view and changing the timeout for start (see graphic). Save your changes, and you're good to go!

Julie
  • 6,221
  • 3
  • 31
  • 37
  • 1
    Just note that you cannot use zero or a negative value to disable the timeout completely, you need to set it to some large value. – Pavel Oct 24 '13 at 08:57
20
  1. On the EclipseIDE, double click on the server
  2. Admin panel opens up, click on the "Timeouts" tab
  3. Put larger value in the "Start (in seconds)", may be 1800
  4. Restart/Start the server

If everything is okay, the server should start.

8

Just another data point. If you see in your Console "Server startup in NNN ms", but the Server view still shows that it is trying to start, and then times out eventually killing the server, it might be that you have no plain HTTP connector configured. For example, if you have only a 2-way SSL connector configured in your Tomcat, it will start fine with the scripts in "TOMCAT_HOME/bin", but if you try to start it with the Eclipse Server view, it won't be able to open a connection to the HTTP port, and will terminate when it hits the timeout. (This was with a fairly old STS 2.1.0. Don't know if it's fixed in later versions)

Joe

Joe
  • 81
  • 1
  • 1
  • Joe, Eclipse Mars wasn't able to determine that the server had started, ever since I altered my Connector in server.xml. My situation matches what you describe. However, I was able to fix it by altering the Hostname field in the Service properties page (found by double-clicking on the server in the "servers" view). – daveloyall May 02 '16 at 23:44
5

Julie's answer gives you a long timeout, but not unlimited. You can move the server configuration file to the workspace, and then edit the xml file directly and set a limit greater than 1800. It's an ugly hack, but should work. alt text

Community
  • 1
  • 1
Yoni
  • 10,171
  • 9
  • 55
  • 72
4

Goto Window > Preferences > Server

Set 'Server timeout delay' as Unlimited from drop-down menu.

or

Goto $WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

Add/update line machine-speed= -1

here, -1 ~ Unlimited

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
Amitesh
  • 41
  • 1
  • curious which version of eclipse had that setting in the UI - 86400 is the max in 2019-09 (4.13.0); setting of -1 in the file did not work. – Jason Pyeron Jan 13 '21 at 18:42
0

If you still has issue after changing timeout settings, then it's best to remove the server configuration in Eclipse (in Server view tab) and re-create it again.

Server --> New Server.

It worked for me.

garikapati
  • 101
  • 1
0

yes this works, but the maximum limit is 1800, which is 30mins.

Sometimes when rebuilding our entire database (on server initial start) this can go for longer than 30mins and causes problems.

Brian Webster
  • 30,033
  • 48
  • 152
  • 225
0

In eclipse 2019-09 (4.13.0) there is no UI capability to set an unlimited value. It must be between 1 and 84600 seconds (a day).

But if you edit the .metadata/.plugins/org.eclipse.wst.server.core/servers.xml file in the workspace and set the server's start-timeout attribute to a large number of in my case -1 it will not abort the server startup until such time is reached. I had to restart eclipse for the change to be read.

NOTE: using the UI to edit other values will coalesce your value to a value within the allowable range.

Jason Pyeron
  • 2,388
  • 1
  • 22
  • 31