Jump to content
We've recently updated our Privacy Statement, available here ×

Anyone else experience Jaspersoft server slow to start after inactivity?


Go to solution Solved by danoldenkampgmail.com,

Recommended Posts

If my users click on the first Jasper Report the page takes 3 minutes to spin up if no one has used the server in a number of hours, then it is quick.

I thought it may be the Apache Tomcat, but I also notice the behavior in Jaspersoft Studio when I first expand the JasperReports Server.  (I don't think serving up server resources in studio uses Tomcat but I could be wrong)

Whoever wakes up "JasperReports Server" it is then good to go for a few hours.

The full setup is on Windows Server 2016.  I can log onto the server before attempting the startup and it doesn't improve the time (not a server going to sleep issue).

I have tried a reinstall and it seems to have the same issue.

My server settings are default.  Jasperreports server cp 7.2.0. 

 

Maybe there is some properties or xml configuration that could alleviate this issue?

Has anyone else heard of this issue?

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

This was annoying me to no end, but I found a solution.

I tried a number of different solutions, adjusting Tomcat Keep-alives, and setting services to restart, eventually I setteld on a task scheduled power shell that once an hour does an http requeste to keep the site alive.

https://www.dnnsoftware.com/community-blog/cid/155007/creating-a-local-keep-alive-service-on-your-web-server

 

It was consistently a problem, now it always stays up and is quick to respond.

Link to comment
Share on other sites

  • 1 year later...
  • 10 months later...

I discovered another cause of this as a result of using systemd to run the reports server as  a service. I had used this article as a guide to configure the service - http://sharpe-s-ux.blogspot.com/2017/04/how-to-run-jasperserver-630-via-systemd.html

However the PID file specified did not exist so systemd restarted the report server every 15 minutes. You need to use the PID of the Catalina Tomcat server which is generally located in the installation apache-tomcat folder. In my case it was /opt/jasperreports-server-cp-7.8.0/apache-tomcat/temp/catalina.pid

Check out your /var/log/messages file and look for systemd starting and stopping the jasper service.

[unit]

Description=Jasper Server 7.8.0
After=syslog.target
After=network.target

[service]
Type=forking
User=apache
Group=apache

Restart=on-failure
PIDFile=/run/jasper_server.pid     *****   THIS IS THE ERROR LINE *****
PIDFile=/opt/jasperreports-server-cp-7.8.0/apache-tomcat/temp/catalina.pid     *****   IT SHOULD BE THIS FOR 7.8.0 *****

KillMode=mixed
ExecStart=/opt/jasperreports-server-cp-7.8.0/ctlscript.sh start
ExecStop=/opt/jasperreports-server-cp-7.8.0/ctlscript.sh stop

RestartSec=10s

TimeoutSec=900   ***** THIS IS WHAT MAKES IT RESTART EVERY 15 MINUTES IF IT CAN'T FIND THE PID FILE *****

[install]
WantedBy=multi-user.target

 

Link to comment
Share on other sites

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...