I have a document attribute without size limitations.
I noticed a problem when uploading PDF files that contains many pages:
"Internal error, Java heap space"
You can try it yourself with this document as an example:
https://www.lopp.net/pdf/princeton_bitcoin_book.pdf
308 pages, around 18 MB.
Have had similar errors with these bigger PDF files, like: "unknown server error".
In this scenario, we don't do any magic with the document once it's uploaded. So I'm pretty sure either the file size, page size or some weird meta data in the PDF makes Aware IM go nuts. Any ideas?
Version 8.4 Build 2713.
Problems when uploading pdf with too many pages(?)
Re: Problems when uploading pdf with too many pages(?)
How much memory do you have allocated to the AIM server and Tomcat?
Avid Linux user....
Re: Problems when uploading pdf with too many pages(?)
The server itself has 8 GB RAM. We could increase this easily if necessary.
About Tomcat, I don't know.
I can't see anything in the server.xml file.
About Tomcat, I don't know.
I can't see anything in the server.xml file.
Re: Problems when uploading pdf with too many pages(?)
try startupoptions.props.
Avid Linux user....
Re: Problems when uploading pdf with too many pages(?)
Thanks!
We havn't touched this file so the values should be default:
Will try tampering with the values later today and report back
We havn't touched this file so the values should be default:
Code: Select all
#Thu Jun 27 15:39:42 CEST 2019
CONFIG_TOOL_STARTUP=..\\JDK\\bin\\java -classpath ../JDK/lib/tools.jar;../docs/help.jar;../lib/* com.bas.uiconfiguration.Application
AWAREIM_SERVER_STARTUP=..\\JDK\\bin\\java -Xmx192m -Xms20m -classpath ../lib/*;../CustomJars/* com.bas.newcp.ServerStarterECP
TOMCAT_STARTUP=..\\JDK\\bin\\java -Xmx64m -Djava.endorsed.dirs\=../Tomcat/endorsed -classpath ../lib/tools.jar;../Tomcat/bin/bootstrap.jar;../Tomcat/bin/tomcat-juli.jar -Dcatalina.base\=../Tomcat -Dcatalina.home\=../Tomcat -Djava.io.tmpdir\=../Tomcat/temp org.apache.catalina.startup.Bootstrap start
Re: Problems when uploading pdf with too many pages(?)
Gee, performance must be terrible!
I would at least do this.
<snip>
AWAREIM_SERVER_STARTUP=..\\JDK\\bin\\java -Xmx4096m -Xms4096m -classpath ../lib/*;../CustomJars/* com.bas.newcp.ServerStarterECP
TOMCAT_STARTUP=..\\JDK\\bin\\java -Xmx2048m -Xms2048m -Djava.endorsed.dirs\=../Tomcat/endorsed -classpath ../lib/tools.jar;../Tomcat/bin/bootstrap.jar;../Tomcat/bin/tomcat-juli.jar -Dcatalina.base\=../Tomcat -Dcatalina.home\=../Tomcat -Djava.io.tmpdir\=../Tomcat/temp org.apache.catalina.startup.Bootstrap start
....
</snip>
The memory settings can actually be setup from the control panel, so have a look in there if your GUI based.
I would at least do this.
<snip>
AWAREIM_SERVER_STARTUP=..\\JDK\\bin\\java -Xmx4096m -Xms4096m -classpath ../lib/*;../CustomJars/* com.bas.newcp.ServerStarterECP
TOMCAT_STARTUP=..\\JDK\\bin\\java -Xmx2048m -Xms2048m -Djava.endorsed.dirs\=../Tomcat/endorsed -classpath ../lib/tools.jar;../Tomcat/bin/bootstrap.jar;../Tomcat/bin/tomcat-juli.jar -Dcatalina.base\=../Tomcat -Dcatalina.home\=../Tomcat -Djava.io.tmpdir\=../Tomcat/temp org.apache.catalina.startup.Bootstrap start
....
</snip>
The memory settings can actually be setup from the control panel, so have a look in there if your GUI based.
Avid Linux user....
Re: Problems when uploading pdf with too many pages(?)
AwareIM is installed as a service.
I did changes to startupoptions.props and restarted the AwareIM and Tomcat service.
I don't think this had any effect at all.
The PDF errors persist, and a quick benchmark of some queries shows that the performance is the same.
Is it possible to see the Tomcat running config?
I did changes to startupoptions.props and restarted the AwareIM and Tomcat service.
I don't think this had any effect at all.
The PDF errors persist, and a quick benchmark of some queries shows that the performance is the same.
Is it possible to see the Tomcat running config?
Re: Problems when uploading pdf with too many pages(?)
when running AwareIM as a service...
I believe the file that needs changing is awareim.confaware_support wrote: ↑Wed May 12, 2021 2:15 am In two files, which are identical - only one is used, but I do not remember which one, so make the change in both.
The files are wrapper.conf and awareim.conf in the BIN directory.
This is the property in these files that sets memory:
wrapper.java.maxmemory=256
Bob
Re: Problems when uploading pdf with too many pages(?)
Yes, I allocate as follows in both wrapper.conf files.
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=1024
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=4096
Note that these files (or one of them) are only read when running as a service as they provide params for the Tanutki Wrapper, which supports running as a service. But I had a long-running issue of large files uploading and crashing the heap. I eventually set the file size limit to 5MB, which works for my purposes. There must be a way to upload much larger files. If you figure it out, please share.
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=1024
# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=4096
Note that these files (or one of them) are only read when running as a service as they provide params for the Tanutki Wrapper, which supports running as a service. But I had a long-running issue of large files uploading and crashing the heap. I eventually set the file size limit to 5MB, which works for my purposes. There must be a way to upload much larger files. If you figure it out, please share.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports
MySQL, AWS EC2, S3
PDFtk Toolkit
Heavy on AwareIM Reports