I recently doing some tests for updating from clickhouse 20.3 to 21.3.2.5.

With this new build, when I am executing  large insertion over the HTTP connection, with compression activated on the client side
Like this query
POST /?query=INSERT+INTO+%60avc%60.%60topconversationdetails%60+FORMAT+RowBinary&database=avc&compress=1&decompress=1 HTTP/1.1
Where data are inside the content on the HTTP request in compressed row binary format

I sometimes see this errors/stack trace in the clickhouse log file :

```
2021.03.19 11:54:42.764099 [ 41063 ] {eba46f57-0491-4ffb-b571-ed9d1618da75} <Error> DynamicQueryHandler: Code: 307, e.displayText() = DB::Exception: Chunk size is too large, Stack trace (when copying this message, always include the lines below):

0. DB::HTTPChunkedReadBuffer::readChunkHeader() @ 0xf8d5e5b in /opt/InfoVista/5ViewSDM/bin/clickhouse
1. DB::HTTPChunkedReadBuffer::nextImpl() @ 0xf8d616b in /opt/InfoVista/5ViewSDM/bin/clickhouse
2. DB::wrapReadBufferReference(DB::ReadBuffer&)::ReadBufferWrapper::nextImpl() @ 0xe7183fc in /opt/InfoVista/5ViewSDM/bin/clickhouse
3. DB::CompressedReadBufferBase::readCompressedData(unsigned long&, unsigned long&, bool) @ 0xe7d88cc in /opt/InfoVista/5ViewSDM/bin/clickhouse
4. DB::CompressedReadBuffer::nextImpl() @ 0xe7d83e7 in /opt/InfoVista/5ViewSDM/bin/clickhouse
5. DB::ConcatReadBuffer::nextImpl() @ 0xe966e1e in /opt/InfoVista/5ViewSDM/bin/clickhouse
6. DB::LimitReadBuffer::nextImpl() @ 0x86a7fcc in /opt/InfoVista/5ViewSDM/bin/clickhouse
7. DB::executeQuery(DB::ReadBuffer&, DB::WriteBuffer&, bool, DB::Context&, std::__1::function<void (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)>) @ 0xf1306cb in /opt/InfoVista/5ViewSDM/bin/clickhouse
8. DB::HTTPHandler::processQuery(DB::Context&, DB::HTTPServerRequest&, DB::HTMLForm&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&, std::__1::optional<DB::CurrentThread::QueryScope>&) @ 0xf84675a in /opt/InfoVista/5ViewSDM/bin/clickhouse
9. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0xf84a8ee in /opt/InfoVista/5ViewSDM/bin/clickhouse
10. DB::HTTPServerConnection::run() @ 0xf8d35ff in /opt/InfoVista/5ViewSDM/bin/clickhouse
11. Poco::Net::TCPServerConnection::start() @ 0x11f7ccbf in /opt/InfoVista/5ViewSDM/bin/clickhouse
12. Poco::Net::TCPServerDispatcher::run() @ 0x11f7e6d1 in /opt/InfoVista/5ViewSDM/bin/clickhouse
13. Poco::PooledThread::run() @ 0x120b4df9 in /opt/InfoVista/5ViewSDM/bin/clickhouse
14. Poco::ThreadImpl::runnableEntry(void*) @ 0x120b0c5a in /opt/InfoVista/5ViewSDM/bin/clickhouse
15. start_thread @ 0x7dd5 in /usr/lib64/libpthread-2.17.so
16. __clone @ 0xfdead in /usr/lib64/libc-2.17.so
 (version 21.3.2.5 (official build))
2021.03.19 11:54:42.764302 [ 41063 ] {eba46f57-0491-4ffb-b571-ed9d1618da75} <Error> DynamicQueryHandler: Cannot send exception to client: Code: 246, e.displayText() = DB::Exception: Unexpected data instead of HTTP chunk header, Stack trace (when copying this message, always include the lines below):

0. DB::HTTPChunkedReadBuffer::readChunkHeader() @ 0xf8d5e02 in /opt/InfoVista/5ViewSDM/bin/clickhouse
1. DB::HTTPChunkedReadBuffer::nextImpl() @ 0xf8d616b in /opt/InfoVista/5ViewSDM/bin/clickhouse
2. DB::HTTPHandler::trySendExceptionToClient(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, DB::HTTPServerRequest&, DB::HTTPServerResponse&, DB::HTTPHandler::Output&) @ 0xf849ca2 in /opt/InfoVista/5ViewSDM/bin/clickhouse
3. DB::HTTPHandler::handleRequest(DB::HTTPServerRequest&, DB::HTTPServerResponse&) @ 0xf84b015 in /opt/InfoVista/5ViewSDM/bin/clickhouse
4. DB::HTTPServerConnection::run() @ 0xf8d35ff in /opt/InfoVista/5ViewSDM/bin/clickhouse
5. Poco::Net::TCPServerConnection::start() @ 0x11f7ccbf in /opt/InfoVista/5ViewSDM/bin/clickhouse
6. Poco::Net::TCPServerDispatcher::run() @ 0x11f7e6d1 in /opt/InfoVista/5ViewSDM/bin/clickhouse
7. Poco::PooledThread::run() @ 0x120b4df9 in /opt/InfoVista/5ViewSDM/bin/clickhouse
8. Poco::ThreadImpl::runnableEntry(void*) @ 0x120b0c5a in /opt/InfoVista/5ViewSDM/bin/clickhouse
9. start_thread @ 0x7dd5 in /usr/lib64/libpthread-2.17.so
10. __clone @ 0xfdead in /usr/lib64/libc-2.17.so
 (version 21.3.2.5 (official build))

```

It does not seems to happen if I disable the client compression (but my requests are larger)


return false;
    
    if (count())
        readChunkFooter();
    size_t chunk_size = readChunkHeader();
    if (0 == chunk_size)
    {
        readChunkFooter();
        in.reset();  
        return false;
    }
    if (in->available() >= chunk_size)
    {
        
        working_buffer = Buffer(in->position(), in->position() + chunk_size);
        in->position() += chunk_size;
    }
    else
    {
        
        memory.resize(chunk_size);
        in->readStrict(memory.data(), chunk_size);
        working_buffer = Buffer(memory.data(), memory.data() + chunk_size);
    }
    
    
    return true;
}
}