Issue when uploading big files to gateway database

I followed the example below to upload files to ignition gateway database, MSSQL.
https://www.ourscada.com/main/system/help/Example_-_Storing_Files_in_a_Database.html
It works fine with files with smaller size, smaller than 2.7mb.
If larger than 2.7mb, there’s an error message popping up, about the Java heap issue.
The gateway designer memory is 4GB.
Is there anyway to resolve this issue?
Some of the files could be over 10mb, and I want to view them from both Vision and Perspective. I thought to store the files in DB is the only way to view the file from both platform.

image

image