Lot's of connections as sleep causing too many connections error

Viewed 917

I implemented Hikari Connection Pooling.

This is my config for the pooling thing.

        config.setUsername("abc");
        config.setPassword("abc");
        config.addDataSourceProperty("maximumPoolSize", "10");
        config.addDataSourceProperty("maxLifetime", "60");
        config.addDataSourceProperty("cachePrepStmts", "true");
        config.addDataSourceProperty("prepStmtCacheSize", "250");
        config.addDataSourceProperty("prepStmtCacheSqlLimit", "2048");
        ds = new HikariDataSource(config);

Problem is that, there are lot's and lot's of(Around 150) connections under command as sleep when I execute show processlist.

This causes "too many connections" issue.

I have two web apps which connect to this db but even if I undeploy them, meaning there are no web apps trying to connect with the db, I still see that the number of connections which are allowed are exhausted.

I have thoroughly gone through similar questions on SO, none is helping me out.

0 Answers
Related