@statira Ideally setting "SOLR_JAVA_MEM" should work. I tried on windows and centos7 environment and it works.
Looks like you already tried setting "SOLR_JAVA_MEM="-Xms4g -Xmx4g" in 'solr.in.sh' file. This should have been sufficient to increase the heap memory.
Can you open the solr admin console (http://127.0.0.1:8983/solr/#/) and validate what you see there in JVM section. e.g.:
If you see the values correctly in the admin console, that means environment variable is working correctly. And you would have to determine the required memory based on your index size etc.
I don't think java version could be an issue because minimum java-8 is needed for ass v1.3 if i remember correctly, not sure .
Check this issue as well:
As per above issue and discussions seems these properties could be also a reason for heap issues... you may give it a try:
SOLR 6 can be configured to work as SOLR 4 was working in previous Alfresco versions by uncommenting alfresco.cross.locale.datatype.N properties in
These blog posts will also be helpful:
(ACSCE, AWS SAA, Azure Admin)