https://questdb.io logo
Title
a

Ajay Pilaniya

12/27/2022, 5:53 AM
Hi… I am using PGWire to update some a single row but getting below error. My query is correct as when running same query again it works. This seems like connection being dropped. (I am using Hikaripool)
Caused by: org.postgresql.util.PSQLException: An I/O error occurred while sending to the backend.
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:338)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:447)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:368)
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:159)
    at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:148)
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
    at jdk.internal.reflect.GeneratedMethodAccessor471.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
    at com.sun.proxy.$Proxy252.execute(Unknown Source)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50)
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194)
    at jdk.internal.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
    ... 43 common frames omitted
Caused by: java.io.EOFException: null
    at org.postgresql.core.PGStream.receiveChar(PGStream.java:372)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2015)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:311)
    ... 64 common frames omitted
a

Andrey Pechkurov

12/27/2022, 8:31 AM
Could you share server-side logs?
a

Ajay Pilaniya

12/27/2022, 9:04 AM
@Andrey Pechkurov By default where do we store the logs? Unable to locate log file on server
a

Andrey Pechkurov

12/27/2022, 9:14 AM
How do you run QuestDB? Docker or binaries? If you're using binaries, there should be files like
<qdb_root>/log/stdout-2022-12-27T11-13-37.txt
a

Ajay Pilaniya

12/27/2022, 9:16 AM
@Andrey Pechkurov Yes running binaries but this path does not exist. Also I don’t have any log.conf file. Do I need to enable logs explicitly ?
There is no log folder on qdb root directory
a

Andrey Pechkurov

12/27/2022, 9:26 AM
Do you use rt binary or it's no-jre?
In any case, you may add
log.conf
to configure logging: https://questdb.io/docs/reference/configuration/#logging
a

Ajay Pilaniya

12/27/2022, 10:08 AM
This seems to be issue with Hikaripool config. It was dropping connection so with few tweaks in config and it has been an hour without such errors
a

Andrey Pechkurov

12/27/2022, 10:15 AM
Sounds great! Could you share your changes? It may be something worth documenting cc @Amy Wang
a

Ajay Pilaniya

12/27/2022, 10:18 AM
Yeah sure. So basically when using HikariPool it validates connection and by default validation timeout was 500ms and due to that connections were dropping. I just changed this timeout :
spring.datasource.hikari.validation-timeout: 300000
a

Andrey Pechkurov

12/27/2022, 10:18 AM
Thanks!