Hi
Im using razuna for a month now, I have lots of folders with assets in them. Python script is looping through folders to do some modification and stuff to assets.
The problem is when I use multi threading and I hit the Apache2 server hard. First 2 minutes (120 seconds) everything is fine. after 2 minutes I get 104 Connection reset by peer, and 110 connection aborted.
Please note that the server is bulky with 32 CPU and 10GB Ram, No Renditions and stuff. The python script is being run on the razuna server(debian)with mysql database. Im fronting the tomcat with apache2 with reverse proxy setting stated in razuna wiki.
Example post request:
response = requests.post(url, data=payload, timeout=600)
Apache virtual host Config:
<virtualhost *:80>
ServerName modisso
DocumentRoot /opt/razuna_tomcat_1_7/
ErrorLog /var/log/apache2/error_razuna.log
CustomLog /var/log/apache2/razuna.log combined
LogLevel warn
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RequestHeader append x_https "off"
ProxyPreserveHost On
ProxyTimeout 600
ProxyVia On
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
</VirtualHost>
<VirtualHost *:80>
ServerName modisso
DocumentRoot /opt/razuna_tomcat_1_7/
ErrorLog /var/log/apache2/error_razuna.log
CustomLog /var/log/apache2/razuna.log combined
LogLevel warn
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RequestHeader append x_https "off"
ProxyPreserveHost On
ProxyTimeout 600
ProxyVia On
ProxyPass / ajp://localhost:8009/ ping=5 timeout=600
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
Tomcat Server.xml (although im api calling on port 80, apache2 is answering the calls I guess as they are static content?)
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="900000"
redirectPort="8443"
maxPostSize="0"
enableLookups="false"
disableUploadTimeout="true"
maxKeepAliveRequests="-1"
useBodyEncodingForURI="true"
compression="off"
server="Razuna Application Server"
URIEncoding="UTF-8"
maxSwallowSize="0"
maxThreads="10350"
minSpareThreads="10125"
acceptCount="10350"
/>
Tomcat setenv.sh
CATALINA_OPTS="$CATALINA_OPTS -server -Xss50M -Xms4G -Xmx4G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Djava.awt.headless=true -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -XX:+PrintGCDateStamps -XX:-OmitStackTraceInFastThrow -Djava.security.egd=file:/dev/./urandom"
# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems. Specifying PermGen size is not valid on IBM JDKs
PRGDIR=`dirname $0`
RAZUNA_MAX_PERM_SIZE=1024m
if [ -f "${PRGDIR}/permgen.sh" ]; then
echo "Detecting JVM PermGen support..."
. ${PRGDIR}/permgen.sh
if [ $JAVA_PERMGEN_SUPPORTED = "true" ]; then
echo "PermGen switch is supported. Setting to ${RAZUNA_MAX_PERM_SIZE}"
CATALINA_OPTS="-XX:PermSize=${RAZUNA_MAX_PERM_SIZE} -XX:MaxPermSize=${RAZUNA_MAX_PERM_SIZE} ${CATALINA_OPTS}"
else
echo "PermGen switch is NOT supported and will NOT be set automatically."
fi
fi
export CATALINA_OPTS
I think there is a 120 second timeout somewhere that I’m Not aware of , Please advise
regards,
Farhad