Jump to content
Changes to the Jaspersoft community edition download ×

How to tune up jasperserver


chuchuaguilera

Recommended Posts

Hi there,

I need a little help from the experts. I'm having problems with temp files. I use jasperserver in a huge application systems. It, I don't know why, is creating a huge ammount of temp files, I mean more than seven hundred thousand files, almost 19 Gb... When it happens the system becomes really unstable and almost crash.  I can understand it creates this files, but I can't understand why it's not erasing or deleting this files. I have another problem. Our database is Oracle. In an unspecific time af the day, I supposed because of the lot of people working, in catalina.out I can see an error that stops the system. It says something like max connections exceeded. I investigated in Google, of course (jejeje), and just could find that I needed to increase the max-connection parameter in Mysql and in a file named /opt/jasperserver-3.1/apache-tomcat/webapps/jasperserver/META-INF/context.xml. By default if has 100 and I increase to 200. I think this problems are because I need to tune-up jasper... Any help is really wellcome... Thanks in advance

Link to comment
Share on other sites

  • Replies 10
  • Created
  • Last Reply

Top Posters In This Topic

These can be from a number of areas, like running a report on the server that has a scriptlet jar.

Where are the temp files? In tomcat or in the user temp area (which Java manages)? What are their names like?

 

JasperServer creates a pool of connections for each JDBC connection defined in the repository. By default, these only have 5 connections. If your users all try to use the same data source and exceed the 5 connections, they will be queued up until a connection becomes available. You can increase the number in the pool by changing WEB-INF/applicationContext.xml - see below. Or you can use a JNDI connection you have set up yourself and set the pool size etc there. As you found out, you need to watch the max # of connections MySQL has, too.

 

Another thing to watch is the number of user threads for Tomcat. This is a Tomcat level configuration.

 

 

Sherman

Jaspersoft

 

 

Code:
    <bean id="dataSourceObjectPoolFactory" class="org.apache.commons.pool.impl.GenericObjectPoolFactory">        <constructor-arg type="org.apache.commons.pool.PoolableObjectFactory"><null/></constructor-arg>        <constructor-arg type="int" value="5"/>    </bean>
Link to comment
Share on other sites

  • 6 months later...

Hi there Sherman,

Excuse my late answer, but I was in another project... Now I'm getting along with jasperserver again. I'm now testing what you advice to me last time. Increasing the  pool of connections in the applicationContext.xml file.

You asked me before a kind of name we are having in the /opt/jasperserser/apache-tomcat/temp directory... This is a example: virt9195358_210345_23410_1291982944.

They, the administrators haven't found what cause this situation, but in my little investigation I've found that the amount of this kind of files increases when there is or there are one or more reports with any mistake, like sql querys or the kind of an object, for example, numeric instead of character...

Thanks in advance

Jesus

 

Link to comment
Share on other sites

The virt* temp files should ideally get cleaned in all cases except a server crash or forceful shutdown.  If there's a different scenario in which virt* files are left in the temp folder, it's a bug.

Log this as a bug.  In your case, are the erroneous reports executed online via the UI, or are the reports scheduled?

Regards,

Lucian

Link to comment
Share on other sites

Thanks a lot for your answer Lucian,

 

Our reports are always executed online, via UI. I only could see that the amount of files increases a lot when a really used report has a bug inside, as I noticed before.

 

I don't know what to do... In some cases the log says too many open files, or too many connections, or just crashs and inhibits to make more reports in all the cases I mentioned.

 

If you or someone can help me and need more information, logs, configuration, whatever, pleasae let me know...

 

Thanks again for your time

Link to comment
Share on other sites

If you're using JasperServer 3.7, you could switch to swap file virtualizers which only create one file per executed report.  To do so, edit WEB-INF/applicationContext.xml and change the definition of the fileVirtualizerFactory bean as below.

For the case with temp files that do not get deleted, please log a bug using the project trackers.  Include as much information as possible about how to reproduce the problem.

Regards,

Lucian

Code:
    <bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory">        <property name="maxSize" value="300"></property>        <property name="directory" value="${java.io.tmpdir}"></property>        <property name="blockSize" value="4096"></property>        <property name="minBlockGrowCount" value="100"></property>    </bean>
Link to comment
Share on other sites

  • 2 weeks later...

 Hello,

I am trying to use the SwapFileVirtualizerFactory class to improve server performance, because report generation is too slow, but when I modify the bean in the applicationContext.xml from FileVirtualizerFactory to SwapFileVirtualizerFactory, tomcat can't start the jasperserver application.

Viewing the log files, I encountered one error in the "directory" property, it says it's an invalid property (Invalid property 'directory' of bean class [com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory]: Bean property 'directory' is not writable or has an invalid setter method.), so, I removed that property and all works fine.

 

Any Ideas of what is happening?

Any repercusion in the bean without that property?



Post Edited by daareiza at 05/19/2010 00:02
Link to comment
Share on other sites

The attributes of the SwapFileVirtualizer are:

public static final int DEFAULT_MAX_SIZE = 200;
public static final int DEFAULT_BLOCK_SIZE = 4096;
public static final int DEFAULT_MIN_BLOCK_GROW_COUNT = 100;

public SwapFileVirtualizerFactory() {
        // default values
        maxSize = DEFAULT_MAX_SIZE;
        tempDirectory = System.getProperty("java.io.tmpdir");
        blockSize = DEFAULT_MIN_BLOCK_GROW_COUNT;
        minBlockGrowCount = DEFAULT_MIN_BLOCK_GROW_COUNT;
}

 

So directory is not right. tempDirectory is correct, and the default is the Java temp directory.

 

Sherman

Jaspersoft

Link to comment
Share on other sites

  • 6 months later...

Hi,

I need a help with class fie (?) - I changed a bean ID in the file applicationContext.xml from "com.jaspersoft.jasperserver.api.engine.common.service.impl.FileVirtualizerFactory" to "com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory" the bean id now is:

 <bean  id="fileVirtualizerFactory"class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory">
    <property name="maxSize" value="400"/>
    <property name="tempDirectory" value="${java.io.tmpdir}"/>
 </bean>

But when I restarted jasper it did'nt start and the log file jasperserver.log under under directory /barcap/bwa/bil/jasperserver-pro-3.1/apache-tomcat/webapps/jasperserver-pro/WEB-INF/logs shows following error:

"11:14:15,550 ERROR [/jasperserver-pro],main:3767 - Exception sending context initialized event to listener instance of class com.jaspersoft.jasperserver.war.util.SpringBeanServletContextPlublisher
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory] for bean with name 'fileVirtualizerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory".

I'm using Jasperserver 3.1.0.1 installed on LINUX box. I suspect that the cause is missing class com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory. What's jar file and directory for this class?

Thank you for help,

Best Regards,

Ed.


 

Link to comment
Share on other sites

  • 1 year later...

While you use SwapFileVirtualizerFactory

Try commenting directory property as shown below.

 

<bean id="fileVirtualizerFactory" class="com.jaspersoft.jasperserver.api.engine.common.service.impl.SwapFileVirtualizerFactory">

<property name="maxSize" value="800"/>

<!--<property name="directory" value="${java.io.tmpdir}"/>-->

</bean>

 

Hope it may help you.

 

Regards,

Ansul Gupta

Link to comment
Share on other sites

  • 3 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...