如何禁用 eclipse 服务器启动超时?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/104640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I disable the eclipse server startup timeout?
提问by Seth Weiner
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?
默认情况下,在 Eclipse Web Tools 中使用 webapp 服务器时,服务器启动将在 45 秒超时后失败。我可以在服务器实例属性中增加此超时,但我没有看到完全禁用超时的方法(在调试应用程序启动时很有用)。有没有办法做到这一点?
回答by Julie
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!
在 Eclipse Indigo 中,您可以通过在“服务器”视图中双击服务器并更改启动超时来编辑默认超时(见图)。保存您的更改,您就可以开始了!
回答by Seth Weiner
- On the EclipseIDE, double click on the server
- Admin panel opens up, click on the "Timeouts" tab
- Put larger value in the "Start (in seconds)", may be 1800
- Restart/Start the server
- 在 EclipseIDE 上,双击服务器
- 管理面板打开,点击“超时”选项卡
- 在“开始(以秒为单位)”中输入更大的值,可能是 1800
- 重新启动/启动服务器
If everything is okay, the server should start.
如果一切正常,服务器应该启动。
回答by Joe
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)
只是另一个数据点。如果您在控制台中看到“Server startup in NNN ms”,但 Server 视图仍然显示它正在尝试启动,然后超时最终杀死服务器,则可能是您没有配置普通的 HTTP 连接器。例如,如果您在 Tomcat 中只配置了一个 2 路 SSL 连接器,它会以“TOMCAT_HOME/bin”中的脚本启动,但如果您尝试使用 Eclipse Server 视图启动它,则不会能够打开与 HTTP 端口的连接,并在超时时终止。(这是一个相当旧的STS 2.1.0。不知道它是否在更高版本中修复)
Joe
乔
回答by Yoni
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.
朱莉的回答给你一个很长的超时时间,但不是无限的。您可以将服务器配置文件移动到工作区,然后直接编辑 xml 文件并设置大于 1800 的限制。这是一个丑陋的 hack,但应该可以工作。
回答by Amitesh
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
转到 $WORKSPACE/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs
Add/update line machine-speed= -1
添加/更新线路 machine-speed= -1
here, -1 ~ Unlimited
在这里,-1 ~ 无限
回答by garikapati
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.
如果更改超时设置后仍有问题,那么最好删除 Eclipse 中的服务器配置(在服务器视图选项卡中)并重新创建它。
Server --> New Server.
服务器 --> 新服务器。
It worked for me.
它对我有用。
回答by garikapati
yes this works, but the maximum limit is 1800, which is 30mins.
是的,这有效,但最大限制为 1800,即 30 分钟。
Sometimes when rebuilding our entire database (on server initial start) this can go for longer than 30mins and causes problems.
有时在重建我们的整个数据库时(在服务器初始启动时),这可能会持续超过 30 分钟并导致问题。