Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

JSONReader OOM #4510

Open
metero20000 opened this issue Jun 8, 2024 · 0 comments
Open

JSONReader OOM #4510

metero20000 opened this issue Jun 8, 2024 · 0 comments

Comments

@metero20000
Copy link

OOM代码行:
JSONReader reader = new JSONReader(bufferedReader);

代码说明:
在Flink中要对一个500M左右的JSON处理,仅仅是打开就OOM,这里不应该消耗大量的缓存。

具体日志:
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at com.alibaba.fastjson2.JSONReaderUTF16.(JSONReaderUTF16.java:111)
at com.alibaba.fastjson2.JSONReader.of(JSONReader.java:3506)
at com.alibaba.fastjson.JSONReader.(JSONReader.java:22)
at com.alibaba.fastjson.JSONReader.(JSONReader.java:17)
at org.lxh.JsonFileSource.run(JsonFileSource.java:29)

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

No branches or pull requests

1 participant