Skip to content

If the return value of JDBC Driver with Druid exceeds a certain number, an error will be reported #1477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
colo1994 opened this issue Mar 31, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@colo1994
Copy link

版本 1.6.5.5
同一个查询接口,SQL语句在命令行中均可以执行。
JDBC在小数据量时不报错,大数据量报错,报错信息如下:
出现在我对结果集遍历的时候
java.sql.SQLException: TDengine Error: invalid resultset pointer!
at com.taosdata.jdbc.TSDBResultSet.next(TSDBResultSet.java:129)
at com.alibaba.druid.filter.FilterChainImpl.resultSet_next(FilterChainImpl.java:917)
at com.alibaba.druid.filter.FilterAdapter.resultSet_next(FilterAdapter.java:1918)
at com.alibaba.druid.filter.FilterChainImpl.resultSet_next(FilterChainImpl.java:913)
at com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl.next(ResultSetProxyImpl.java:882)
at com.alibaba.druid.pool.DruidPooledResultSet.next(DruidPooledResultSet.java:69)
at com.jysoft.server.Test.executeSql(Test.java:166)

@colo1994 colo1994 added the bug Something isn't working label Mar 31, 2020
@Shawshank-Smile
Copy link
Contributor

Shawshank-Smile commented Mar 31, 2020

Same as #1307
Please add my wechat 13720014098, and let us discuss the log.

@Shawshank-Smile Shawshank-Smile changed the title JDBC的驱动结合DRUID在查询的返回值超过一定数量则报错 If the return value of JDBC Driver with Druid exceeds a certain number, an error will be reported Apr 2, 2020
@colo1994
Copy link
Author

colo1994 commented Apr 3, 2020

Use TCP instead of UDP for transporting data, and this problem will not show again.

是在/etc/taos/taos.cfg 中文件sockettype 改成 tcp吗?
我再服务端打开了这个#号,修改为tcp ,然后重启服务可以了。
我本地的电脑是Windows,在C:\TDengine\cfg\taos.cfg 中sockettype 修改为tcp
然后再本地调用一个查询,报错了,日志如下

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fec0f30191, pid=152692, tid=0x0000000000037c80

JRE version: Java(TM) SE Runtime Environment (8.0_191-b12) (build 1.8.0_191-b12)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.191-b12 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [taos.dll+0xf0191]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

看样子是taos.dll 的问题,是我修改错了地方吗?
我的jar包是1.0.3版本

@Shawshank-Smile
Copy link
Contributor

This problem will be finally solved by TDengine 2.0 , which will be available very soon.

@johnnyhou327
Copy link
Contributor

The "invalid resultset pointer" exception is most likely caused by an unexpected release of the result set pointer at TDengine server side (taosd). Here is how the whole process works.
After each query, there will be a result set whose information is stored in the taosd process. The TDengine client (in this case, your Java program) retrieves data of the result set in a block-wise way, i.e. each retrieval fetches a single block of data from the server side. However, there is a timeout threshold for taosd between two consecutive data block retrievals for the same result set. The timeout threshold is set to 3 seconds by default, which honestly is not very long. There are situations that can lead to a timeout for data retrieval, for example poor network connection, a slow cursor moving in JDBC or other connectors etc.

To avoid the server timeout, try increasing the timeout threshold to a larger value, e.g. 20 seconds by modifying the parameter named "shellActivityTimer" in taosd's configuration file. Add the line below in TDengine's configuration file, which by default is at /etc/taos/taos.cfg.
shellActivityTimer 20
After updating the taos.cfg file, restart taosd to load the new configuration. And then you should have a more patient taosd to keep your result set alive.

@Chaexsy
Copy link

Chaexsy commented Jul 2, 2020

改为tcp ,然后重启服务可以了。
我本地的电脑是Windows,在C:\TDengine\cfg\taos.cfg 中sockettype 修改为tcp
然后再本地调用一个查询,报错了,日志如下

我遇到了相同的问题,LZ解决了吗?

@zyyang90
Copy link
Contributor

把tdengine和taos-jdbcdriver更新到最新版本,这个问题在新版本中不在出现了。我们检查了多线程操作结果集的逻辑,现在可以规避这个问题了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants