When I rollback to a previous version using 1.6.0_20 my application boots within 60 seconds. 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. That solved the bind problem but now I have a memory problem. Under high load may app was using 600M of memory. But now I see ~1500M and it is continuously increasing.
@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. I have informed Heroku about the issue but they didn't really care.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.