Hello Reto,
I donot know how many of the following tips you are using right now, but
I am sure that a fresh look at these will
help you out.
1. Ensure that you manually free connection objects, when they are no
more needed.
2. Try to use the concept of caching data in your objects in form of
static member variables. Store these
objects in Session.
3. Minimise the no. of database queries. ( as you have said the site
makes heavy use of the database)
4. Use stored procedures of database.
5. Optimize your queries. Donot use Select * from employeTable. Use
specific column names.
6. Use indexes in your tables. But use only optimized indexes.
7. Read the book "Java Design Patterns for better performance and
architecture.
I hope if you look at your application as a critic, keeping in mind the
above points, you will get the purpose solved.
Sandeep
****************************************************************************
*******************
Reply to :
hello all,
we build a application with jsp/servlets. the site makes heavy use of the
database through jdbc datasources, that are bound to a jndi context, so the
db shouldn't be a bottleleck. We're using the webserver resin from caucho
tech. the web traffic is not so big (less than 20'000 pageviews per day).
The OS is FreeBSD4.2 on a P-III900/512ram.
>From time to time the (1-5 days) site is slowing down and with 'top' i see
that the java-process(webserver) is taking more than 98% of the CPU. And
there is no free memory left. Restart the webserver is the only possibilty
to get all things work normal.
It worked better when i replaced all strings with StringBuffers / append().
But the problem is still not solved.
Are there any other hints / tips to speed up our application and use the
server memory more efficient.
- should I use scriptles/html in the jsp pages or try to write all the
html-code directly to the JspWriter?
- any other ideas?
thanks for any help.
regards,
reto
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets