The "Tune Sun HotSpot JVMs" section in Manual says below.
" As a best practice, set this value to at least 2048m (2 GB), even for small installations. For improved performance and fewer out-of-memory errors, set this value to 4 GB or 8 GB for larger datasets. For example, -Xms1024m -Xmx4096m.".
Recommend to increase Max Heap size for app service to 4GB.Tune Sun HotSpot JVMs