Skip to content
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

flume 请求一次 获取的数据量过大 内存溢出的问题 #1

Open
HbnKing opened this issue Feb 13, 2019 · 2 comments
Open

Comments

@HbnKing
Copy link
Owner

HbnKing commented Feb 13, 2019

2019-02-13 17:06:04,032 (PollableSourceRunner-SQLSource-r1) [INFO - com.hbn.rdb.common.DriverQuery.executeQuery(DriverQuery.java:67)] select * from  newtable  where id > 189606791   ;
Exception in thread "PollableSourceRunner-SQLSource-r1" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at java.lang.Integer.valueOf(Integer.java:832)
        at com.mysql.cj.core.conf.ReadableIntegerProperty.getValue(ReadableIntegerProperty.java:41)
        at com.mysql.cj.core.conf.ReadableIntegerProperty.getValue(ReadableIntegerProperty.java:31)
        at com.mysql.cj.mysqla.io.TextRowFactory.createFromPacketPayload(TextRowFactory.java:64)
        at com.mysql.cj.mysqla.io.TextRowFactory.createFromPacketPayload(TextRowFactory.java:40)
        at com.mysql.cj.mysqla.io.ResultsetRowReader.read(ResultsetRowReader.java:83)
        at com.mysql.cj.mysqla.io.ResultsetRowReader.read(ResultsetRowReader.java:38)
        at com.mysql.cj.mysqla.io.MysqlaProtocol.read(MysqlaProtocol.java:1660)
        at com.mysql.cj.mysqla.io.TextResultsetReader.read(TextResultsetReader.java:82)
        at com.mysql.cj.mysqla.io.TextResultsetReader.read(TextResultsetReader.java:43)
        at com.mysql.cj.mysqla.io.MysqlaProtocol.read(MysqlaProtocol.java:1672)
        at com.mysql.cj.mysqla.io.MysqlaProtocol.readAllResults(MysqlaProtocol.java:1718)
        at com.mysql.cj.mysqla.io.MysqlaProtocol.sqlQueryDirect(MysqlaProtocol.java:1006)
        at com.mysql.cj.mysqla.MysqlaSession.sqlQueryDirect(MysqlaSession.java:431)
        at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1974)
        at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:1936)
        at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1422)
        at com.hbn.rdb.common.DriverQuery.executeQuery(DriverQuery.java:70)
        at com.hbn.rdb.source.SQLSourceHelper.executeQuery(SQLSourceHelper.java:245)
        at com.hbn.rdb.source.SQLSource.process(SQLSource.java:79)
        at org.apache.flume.source.PollableSourceRunner$PollingRunner.run(PollableSourceRunner.java:133)
        at java.lang.Thread.run(Thread.java:748)
@HbnKing
Copy link
Owner Author

HbnKing commented Feb 13, 2019

1建议采用分页模型
2增加flume 内存

@HbnKing
Copy link
Owner Author

HbnKing commented Mar 8, 2019

flume -ng 的 设置 修改 vi bin/flume-ng 修改java ops

################################
# main
################################

# set default params
FLUME_CLASSPATH=""
FLUME_JAVA_LIBRARY_PATH=""
JAVA_OPTS="-Xmx1024m"
LD_LIBRARY_PATH=""

默认 20m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant