Look at the following links to know how to increase SNAP memory…
Increase snappy memory(python): in python when we face with the problem of
java.lang.OutOfMemoryError: Java heap space or Data Buffer
good link to increase memory when we use GPT:(comment 6)