WARN [2018-01-24 16:00:00,537] org.hibernate.engine.jdbc.spi.SqlExceptionHelper: SQL Error: 0, SQLState: 08006

846 views
Skip to first unread message

mlin...@gmail.com

unread,
Jan 25, 2018, 10:01:06 AM1/25/18
to dropwizard-user
I have a test running inside my code that has a connection using dropwizard. I have 5 tests going on within my code. These tests are all in separate docker containers so they don't interfere with each other as well. The tests i have running are all inserting into a database the time. The difference is length between inserts, i have a 1 second, 1 minute, 1 hour, 2 hour and 3 hour idle times. The error/warning i get is from the 1 hour and up tests and as i read in to it it sates that it is a connection issue. So my main question is why is dropwizard dropping the connection for anything not even as long as an hour of idle time. Is this a config setting somewhere that i missed or something completely different.

Lutz Horn

unread,
Jan 25, 2018, 10:04:40 AM1/25/18
to dropwiz...@googlegroups.com
> So my main question is
> why is dropwizard dropping the connection for anything not even as
> long as an hour of idle time. Is this a config setting somewhere that
> i missed or something completely different.

Show us the relevant part of your configuration.

Lutz

mlin...@gmail.com

unread,
Jan 25, 2018, 10:14:27 AM1/25/18
to dropwizard-user
hibernateConfig:
    driverClass: org.postgresql.Driver
    user: user
    password: password

    url: database.url
    properties:
        charSet: UTF-8
        hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
        org.hibernate.envers.audit_strategy: org.hibernate.envers.strategy.ValidityAuditStrategy
        org.hibernate.envers.audit_strategy_validity_store_revend_timestamp: true
        org.hibernate.envers.default_schema: audit
    maxWaitForConnection: 1s

    # min number of connections to keep open
    minSize: 8

    # max number of connections to keep open
    maxSize: 32

    # whether or not idle connections should be validated
    checkConnectionWhileIdle: false

mlin...@gmail.com

unread,
Jan 25, 2018, 10:14:59 AM1/25/18
to dropwizard-user
sorry posted the reply in the wrong place

mlin...@gmail.com

unread,
Jan 25, 2018, 10:15:29 AM1/25/18
to dropwizard-user
hibernateConfig:
    driverClass: org.postgresql.Driver
    user: user
    password: password

    url: database.url
    properties:
        charSet: UTF-8
        hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
        org.hibernate.envers.audit_strategy: org.hibernate.envers.strategy.ValidityAuditStrategy
        org.hibernate.envers.audit_strategy_validity_store_revend_timestamp: true
        org.hibernate.envers.default_schema: audit
    maxWaitForConnection: 1s

    # min number of connections to keep open
    minSize: 8

    # max number of connections to keep open
    maxSize: 32

    # whether or not idle connections should be validated
    checkConnectionWhileIdle: false

On Thursday, January 25, 2018 at 10:04:40 AM UTC-5, Lutz Horn wrote:

Lutz Horn

unread,
Jan 25, 2018, 10:18:58 AM1/25/18
to dropwiz...@googlegroups.com
> # whether or not idle connections should be validated
> checkConnectionWhileIdle: false

Have you tried to set this to true?

mlin...@gmail.com

unread,
Jan 25, 2018, 10:21:51 AM1/25/18
to dropwizard-user
I have not, i'll try it and get back to you

mlin...@gmail.com

unread,
Jan 26, 2018, 8:07:27 AM1/26/18
to dropwizard-user
Ok so i ran through m tests and let them run over night, this did work but why would it need this kind of "keep alive" active just so the connection isnt dropped, what would cause it to drop in the first place?
Reply all
Reply to author
Forward
0 new messages