[英]After Java 1.6.0_27 update Heroku application does not boot in 60 seconds
When I rollback to a previous version using 1.6.0_20 my application boots within 60 seconds. 当我使用1.6.0_20回滚到以前的版本时,我的应用程序会在60秒内启动。 Given the facts below how can I debug and solve the issue?
鉴于以下事实,我该如何调试和解决问题?
--UPDATE I have created a Plugin and issued a fake port bind which will be closed after 10 seconds. --UPDATE我创建了一个插件,并发出了一个伪造的端口绑定,它将在10秒后关闭。 That solved the bind problem but now I have a memory problem.
那解决了绑定问题,但是现在我遇到了内存问题。 Under high load may app was using 600M of memory.
在高负载下,应用可能正在使用600M的内存。 But now I see ~1500M and it is continuously increasing.
但是现在我看到了约1500M,并且还在不断增加。
@Override
public void onConfigurationRead() {
final int port = Integer.parseInt(Play.configuration.getProperty("http.port"));
try {
// Create a new server socket and set to non blocking mode
final ServerSocketChannel ssc = ServerSocketChannel.open();
ssc.configureBlocking(false);
InetSocketAddress isa = new InetSocketAddress(port);
ssc.socket().bind(isa);
Logger.info("Fake bind to port %d", port);
Timer timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
try {
ssc.socket().close();
Logger.info("Fake port closed");
} catch (IOException ioe) {
Logger.error(ioe, "Cannot close fake port");
}
}
}, 10000);
} catch (IOException ioe) {
Logger.error(ioe, "Cannot open fake port");
}
Cache.forcedCacheImpl = RedisCacheImpl.getInstance();
}
I have switched to jdk 7. My app now boots in 40 seconds and uses 500-600MB of memory. 我已切换到jdk7。我的应用程序现在可以在40秒内启动,并使用500-600MB的内存。 I have informed Heroku about the issue but they didn't really care.
我已经将此问题告知了Heroku,但他们并不在乎。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.