0
good afternoon!
I’m starting to practice my studies with Web development and when hosting and climbing a JSF site with Spring and Hibernate, the first access is very slow. Once it accesses, the manipulation is very fast.
This delay also happens after some time passed and a new access is made.
I’m thinking it might be some Tomcat configuration problem in the hosting or some parameter I’m missing in setting the environment.
Any hints, please?
Context.xml
<Resource name="jdbc/baseDB" auth="Container" type="javax.sql.DataSource" maxTotal="100" maxIdle="30" maxWaitMillis="10000" validationQuery="SELECT 1" validationInterval="30000" username="root" password="root" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/base?autoReconnect=true" />
Evaluating the Tomcat log I think the problem is the automatic container shutdown:
INFO org.apache.catalina.core.StandardServer- A valid shutdown command was received via the shutdown port. Stopping the Server instance.
After about 20 minutes without accessing the site, falls the message above in the Log. Hence the next access is slow again.