简体   繁体   中英

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. Given the facts below how can I debug and solve the issue?

  • My application is using Play 1.2.5
  • In the logs I see the application connects to the PostgreSQL database. That is usually the last log before R10 error.

--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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM