java.lang.OutOfMemoryError: Failed to allocate a 52962812 byte allocation with 16764752 free bytes and 41MB until OOM

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by FredMaggiowski
, 1 year ago
Failed to allocate a 52962812 byte allocation with 16764752 free bytes and 41MB until OOM
via Stack Overflow by BGoll
, 1 year ago
Failed to allocate a 35116844 byte allocation with 16773184 free bytes and 32MB until OOM
via GitHub by BoldijarPaul
, 1 year ago
Failed to allocate a 44479330 byte allocation with 10427408 free bytes and 9MB until OOM
via Stack Overflow by jones
, 1 year ago
Failed to allocate a 31082250 byte allocation with 4182256 free bytes and 19MB until OOM
via GitHub by BraunreutherA
, 1 year ago
Failed to allocate a 46569656 byte allocation with 16777216 free bytes and 24MB until OOM
via Stack Overflow by Ignacious
, 1 year ago
Failed to allocate a 20169966 byte allocation with 8349984 free bytes and 7MB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 52962812 byte allocation with 16764752 free bytes and 41MB until OOM
at java.lang.StringFactory.newStringFromChars(Native Method)
at java.lang.AbstractStringBuilder.toString(AbstractStringBuilder.java:629)
at java.lang.StringBuilder.toString(StringBuilder.java:663)
at org.json.JSONStringer.toString(JSONStringer.java:430)
at org.json.JSONObject.toString(JSONObject.java:690)
at it.example.sampler.controllers.network.RequestBodyEncoder.serialise(RequestBodyEncoder.java:69)
at it.example.sampler.controllers.network.RequestBodyEncoder.createPacket(RequestBodyEncoder.java:50)
at it.example.sampler.services.FileStoreRunnable.run(FileStoreRunnable.java:57)
at java.lang.Thread.run(Thread.java:818)

Users with the same issue

30 times, 10 months ago
58 times, 1 year ago
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.