You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "weilai201 (via GitHub)" <gi...@apache.org> on 2024/03/01 03:29:32 UTC

[I] [Bug] doris通过datax导入数据提示内存超限 [doris]

weilai201 opened a new issue, #31637:
URL: https://github.com/apache/doris/issues/31637

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   2.0.4-rc6
   
   ### What's Wrong?
   
   我现在有一台4和16GB内存的机器,上面部署了doris fe和be。be做了如下配置:
   mem_limit = 50%
   segment_cache_capacity=10000
   disable_mem_pools=true
   load_process_max_memory_limit_percent=40
   
   在使用datax持续写入数据过程中,发现be内存一直在增加,直到系统datax导入数据失败。
   错误消息如下
   `{"BeginTxnTimeMs":0,"Comment":"","CommitAndPublishTimeMs":0,"Label":"my_prefix291e78fc-ad72-4fdb-9d59-c28a8d04519a_45","LoadBytes":8376020,"LoadTimeMs":3146,"Message":"[INTERNAL_ERROR]cancelled: Process has no memory available, cancel top memory used load: load memory tracker <Load#Id=9f448e1aefe9d246-9a7f4d671b5aeeb6> consumption 11.09 MB, backend 192.168.1.103 process memory used 7.74 GB exceed limit 7.69 GB or sys available memory 1.46 GB less than low water mark 1.54 GB. Execute again after enough memory, details see be.INFO.\n\n\t0#  doris::io::StreamLoadPipe::_append(std::shared_ptr<doris::ByteBuffer> const&, unsigned long) at /home/zcp/repo_center/doris_release/doris/be/src/common/status.h:0\n\t1#  doris::io::StreamLoadPipe::append(std::shared_ptr<doris::ByteBuffer> const&) at /home/zcp/repo_center/doris_release/doris/be/src/io/fs/stream_load_pipe.cpp:162\n\t2#  doris::StreamLoadAction::on_chunk_data(doris::HttpRequest*) at /home/zcp/repo_center/doris_release/doris/be/src/
 common/status.h:442\n\t3#  ?\n\t4#  bufferevent_run_readcb_\n\t5#  ?\n\t6#  ?\n\t7#  ?\n\t8#  ?\n\t9#  std::_Function_handler<void (), doris::EvHttpServer::start()::$_0>::_M_invoke(std::_Any_data const&) at /var/local/ldb_toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/atomicity.h:98\n\t10# doris::ThreadPool::dispatch_thread() at /home/zcp/repo_center/doris_release/doris/be/src/util/threadpool.cpp:0\n\t11# doris::Thread::supervise_thread(void*) at /var/local/ldb_toolchain/bin/../usr/include/pthread.h:562\n\t12# start_thread\n\t13# clone\n","NumberFilteredRows":0,"NumberLoadedRows":0,"NumberTotalRows":0,"NumberUnselectedRows":0,"ReadDataTimeMs":17,"Status":"Fail","StreamLoadPutTimeMs":3,"TwoPhaseCommit":"false","TxnId":2124,"WriteDataTimeMs":1918}
    `
   
   内存消耗截图:
   
   <img width="1837" alt="image" src="https://github.com/apache/doris/assets/12964080/e0b9d2a5-4e31-463a-bbb3-52f446cad88c">
   
   
   ### What You Expected?
   
   be可以自动做内存释放!当内存不足时,可降低处理速度,提升系统稳定性
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman closed issue #31637: [Bug] doris通过datax导入数据提示内存超限
URL: https://github.com/apache/doris/issues/31637


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972655156

   workload group现在可以限制查询,可以排队,但是streamload不知道能不能排队


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972781704

   但是maxBatchRows也是满足条件就插入,这个可以搞得大一点,doris不怕一个批次大,就怕插入快


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1973114231

   我也是遇到相同的问题,调整导入频率就可以解决,doris本身应该没什么再调节的了,你可以试试单副本导入
   https://mp.weixin.qq.com/s/aLq7glxsN4NWw01RS_7riA


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972742152

   你现在写入是几个并发,写入时间间隔是多久,可以降低并发增加时间间隔试试,说白了还是数据大,机器小


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1973097474

   有没有什么配置,可以让我导入一批次,内存就释放一批次?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1973093942

   > 但是maxBatchRows也是满足条件就插入,这个可以搞得大一点,doris不怕一个批次大,就怕插入快
   
   我把maxBatchRows=500000(50万),maxBatchByteSize=1008576000(1GB)。跑几分钟,提示如下错误
   
   `{"BeginTxnTimeMs":0,"Comment":"","CommitAndPublishTimeMs":0,"Label":"my_prefixd17e9795-7326-4e46-ba9d-3256c1587bd2_10","LoadBytes":361499996,"LoadTimeMs":3773,"Message":"[INTERNAL_ERROR][INTERNAL_ERROR]close wait failed coz rpc error, host: 192.168.1.103","NumberFilteredRows":0,"NumberLoadedRows":0,"NumberTotalRows":0,"NumberUnselectedRows":0,"ReadDataTimeMs":169,"Status":"Fail","StreamLoadPutTimeMs":4,"TwoPhaseCommit":"false","TxnId":2629,"WriteDataTimeMs":3768}`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972761777

   flushInterval
   
   描述:数据写入批次的时间间隔。如果这个时间间隔设置的太小会造成 Doris 写阻塞问题,错误代码 -235,同时如果你这个时间设置太小,maxBatchRows 和 batchSize 参数设置的有很大,那么很可能达不到你这设置的数据量大小,也会执行导入。
   必选:否
   默认值:30000(ms),你可以设置60秒,120秒试试


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1973099123

   内存管理还是要靠doris来保障啊。不能靠外部调参数来避开问题,这样很难调整到一个合理的参数配置


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972752447

   > 你现在写入是几个并发,写入时间间隔是多久,可以降低并发增加时间间隔试试,说白了还是数据大,机器小
   
   单线程,持续写入。每批最大记录数量500000,最大数据包:100MB。这个是doris推荐的指标。为了减少文件数量。但是为什么写一段时间后就失败了呢。是有些数据没有GC到吗?那这个可以认为是内存泄漏吗?这样的话,不管我添加多少内存,也解决不了问题哈。我想搞清楚为什么随着数据的写入,内存暂用会越来越大


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-3288992898

   We're closing this issue because it hasn't been updated in a while.
   If you'd like to revive this issue, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972734497

   > workload group现在可以限制查询,可以排队,但是streamload不知道能不能排队
   
   有个地方请教一下!有个地方我不太理解,也没找到相关资料,就是我在执行数据导入时候,be的内存会出现小批量释放,但是整体会持续增长,一直到内存无法满足要求,从而导致导入失败!
   
   不知道doris be里面如何做内存管理的?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972748986

   > 你现在写入是几个并发,写入时间间隔是多久,可以降低并发增加时间间隔试试,说白了还是数据大,机器小
   
   单线程,持续写入。每批最大记录数量500000,最大数据包:100MB。这个是doris推荐的指标。为了减少文件数量。但是为什么写一段时间后就失败了呢。是有些数据没有GC到吗?那这个可以认为是内存泄漏吗?这样的话,不管我添加多少内存,也解决不了问题哈


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972757873

   没有设置时间间隔的。写完一批,立即开始下一批


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972759047

   如果加了时间间隔,内存能够自动释放吗?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972580602

   自能自己降低处理速度


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "weilai201 (via GitHub)" <gi...@apache.org>.
weilai201 commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972626276

   > 自能自己降低处理速度
   
   这个对使用者来说要求太高了。没有官网没有具体指标告诉我多大内存能够承受多大的数据写入。如果be自己能够感知到内存不足,be可以使用排队方式,交替load数据入库,或者执行等待,而不是失败。
   对于用户,数据库的稳定性远远要高于高性能。这是我个人的理解!
   
   不知道有没有办法或者通过相关配置参数的合理配置来解决这个问题?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [I] [Bug] doris通过datax导入数据提示内存超限 [doris]

Posted by "zhbdesign (via GitHub)" <gi...@apache.org>.
zhbdesign commented on issue #31637:
URL: https://github.com/apache/doris/issues/31637#issuecomment-1972755707

   > > 你现在写入是几个并发,写入时间间隔是多久,可以降低并发增加时间间隔试试,说白了还是数据大,机器小
   > 
   > 单线程,持续写入。每批最大记录数量500000,最大数据包:100MB。这个是doris推荐的指标。为了减少文件数量。但是为什么写一段时间后就失败了呢。是有些数据没有GC到吗?那这个可以认为是内存泄漏吗?这样的话,不管我添加多少内存,也解决不了问题哈
   
   批次间隔是多久


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org