ClickHouse-Native-JDBC icon indicating copy to clipboard operation
ClickHouse-Native-JDBC copied to clipboard

new clickhouse version insert data slowly

Open maimaip opened this issue 2 years ago • 3 comments

Environment

  • OS version:
  • JDK version: 1.8
  • ClickHouse Server version: 22.1.3
  • ClickHouse Native JDBC version: 2.6.4
  • (Optional) Spark version: 3.0.0
  • (Optional) Other components' version: N/A

Error logs

1.executeQuery: Code: 159. DB::Exception: Timeout exceeded: elapsed 35.707100805 seconds, maximum: 20  (TIMEOUT_EXCEEDED) (version 22.1.3.7 (official build)) sql( insert into table (.....))
0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa82d07a in /usr/bin/clickhouse1. DB::ExecutionSpeedLimits::checkTimeLimit(Stopwatch const&, DB::OverflowMode) const @ 0x13b36925 in /usr/bin/clickhouse2. DB::PipelineExecutor::finalizeExecution() @ 0x14854942 in /usr/bin/clickhouse3. DB::PipelineExecutor::executeStep(std::__1::atomic<bool>*) @ 0x14854add in /usr/bin/clickhouse4. DB::TCPHandler::processInsertQuery() @ 0x147f78c0 in /usr/bin/clickhouse5. DB::TCPHandler::runImpl() @ 0x147f0792 in /usr/bin/clickhouse6. DB::TCPHandler::run() @ 0x14804259 in /usr/bin/clickhouse
 Poco::Net::TCPServerConnection::start() @ 0x1745e52f in /usr/bin/clickhouse8. Poco::Net::TCPServerDispatcher::run() @ 0x17460981 in /usr/bin/clickhouse9. Poco::PooledThread::run() @ 0x17611609 in /usr/bin/clickhouse10. Poco::ThreadImpl::runnableEntry(void*) @ 0x1760ed00 in /usr/bin/clickhouse11. start_thread @ 0x7dd5 in /usr/lib64/libpthread-2.17.so12. __clone @ 0xfdead in /usr/lib64/libc-2.17.so

2. Unexpected packet Data received from client. (UNEXPECTED_PACKET_FROM_CLIENT), Stack trace (when copying this message, always include the lines below): 0. DB::Exception::Exception(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool) @ 0xa82d07a in /usr/bin/clickhouse
DB::TCPHandler::receiveUnexpectedData(bool) @ 0x14801e74 in /usr/bin/clickhouse
DB::TCPHandler::receivePacket() @ 0x147f668f in /usr/bin/clickhouse
DB::TCPHandler::runImpl() @ 0x147efdc0 in /usr/bin/clickhouse
DB::TCPHandler::run() @ 0x14804259 in /usr/bin/clickhouse
Poco::Net::TCPServerConnection::start() @ 0x1745e52f in /usr/bin/clickhouse
Poco::Net::TCPServerDispatcher::run() @ 0x17460981 in /usr/bin/clickhouse
 Poco::PooledThread::run() @ 0x17611609 in /usr/bin/clickhouse
Poco::ThreadImpl::runnableEntry(void*) @ 0x1760ed00 in /usr/bin/clickhouse
start_thread @ 0x7dd5 in /usr/lib64/libpthread-2.17.so
__clone @ 0xfdead in /usr/lib64/libc-2.17.so

Steps to reproduce

i use com.github.housepower:clickhouse-native-jdbc spark batch insert data to clickhouse batch size 12000

Other descriptions

when i update clickhouse from 21.9.4 to 22.1.3 other develop not change, the same table insert the old clickhouse version is not error but then latest clickhouse error . the error issue : insert sql limit max_excute_time . i change the max_executor_time 40 the error issue is also happened.

maimaip avatar Feb 10 '22 07:02 maimaip

I think it may not be related to this driver, did you make some test with other drivers?

sundy-li avatar Feb 10 '22 09:02 sundy-li

I think it may not be related to this driver, did you make some test with other drivers?

other drivers i test the same error alse happend. i think it may not reltated to driver. i may clickhouse latest version writing mechanism .

maimaip avatar Feb 10 '22 09:02 maimaip

Ok, please read the change logs and verify the settings changes.

sundy-li avatar Feb 10 '22 09:02 sundy-li