Error when import large OpenAPI definition file.

31 views
Skip to first unread message

Johnson Chong

unread,
Aug 28, 2023, 5:12:52 AM8/28/23
to ZAP User Group
Hi Team,

When I am import OpenAPI definition from file (Yaml).
It works so fine for small file (~100kb) but failed for large file (~1-2gb).

Error:
75885 [AWT-EventQueue-0] ERROR org.zaproxy.zap.ZAP.UncaughtExceptionLogger - Exception in thread "AWT-EventQueue-0"
java.lang.OutOfMemoryError: Java heap space
        at com.fasterxml.jackson.core.util.TextBuffer.carr(TextBuffer.java:1155) ~[?:?]
        at com.fasterxml.jackson.core.util.TextBuffer.expand(TextBuffer.java:1111) ~[?:?]
        at com.fasterxml.jackson.core.util.TextBuffer.append(TextBuffer.java:783) ~[?:?]

I try increase the java heap size to -Xmx4g not sure if it's the correct way, but still got the above error.
May I know is there any things I can do if I want to import this kind of large file?

Thanks.

kingthorin+zap

unread,
Aug 28, 2023, 10:57:37 AM8/28/23
to ZAP User Group
Are you able to provide the file or a public link to it?
Message has been deleted

Johnson Chong

unread,
Aug 28, 2023, 10:48:12 PM8/28/23
to ZAP User Group
Worked when import via URL. Thanks.
Reply all
Reply to author
Forward
0 new messages