Skip to content

Commit bd43a41

Browse files
committed
server: support bigger json parser max string
Default from 50_000 -> 2_000_000
1 parent d0c4eda commit bd43a41

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/src/main/java/org/ebean/monitor/Application.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
public class Application {
77

88
public static void main(String[] args) {
9+
// avaje-json's JParser caps string values at jsonb.parserMaxStringBuffer (default 50 000).
10+
// Postgres EXPLAIN plans can be much larger, so raise the limit before any jsonb class is
11+
// loaded (Recyclers reads this as a static final at class-load time).
12+
int planBufferSize = Config.getInt("ingest.planMaxStringBuffer", 2_000_000);
13+
System.setProperty("jsonb.parserMaxStringBuffer", String.valueOf(planBufferSize));
914
AvajeJex.start();
1015
}
1116

0 commit comments

Comments
 (0)