Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error 500--Internal Server Error.....

 
chandrakanth boga
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have got a BIG PROBLEM...........

I accessed http://ua.lge.com
and we got error:----------------------

Error 500--Internal Server Error

From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:

10.5.1 500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.


When i checked in the LOG files ...it is showing :--

<<no stack trace available>>
>
<Mar 10, 2006 5:18:15 AM GMT-01:00> <Error> <HTTP> <[WebAppServletContext(1404779,DefaultWebApp,/DefaultWebApp
)] Servlet failed with Exception
java.lang.OutOfMemoryError
<<no stack trace available>>
>
<Mar 10, 2006 5:21:37 AM GMT-01:00> <Error> <HTTP> <[WebAppServletContext(1404779,DefaultWebApp,/DefaultWebApp
)] Servlet failed with Exception
java.lang.OutOfMemoryError
<<no stack trace available>>


Could anyone tell me what will be the solution for this problem.
We restarted the server ..now it is working fine.But After 2 days it is giving same problem.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It could be as simple as giving the server more memory, but you should use a memory profiling tool to see if you have a memory leak. If you do, then yes, you have big troubles. It's not impossible to diagnose and fix memory leakis, but sometimes there may be a bit of a trick to it. Profiling tools are a must-have though.

Dave
 
balakrishna billa
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Think the problem with Memory leaks in the Applications....
Web-Applications are very prone to Memory Leaks....
to fix these kind of problems u need to use profiling tools to find where the Memory leaks are occuring....

Finding a memory-leak in the application is not an easy task. little bit of patience is requires to see where went wrong.

There are somany tools in the market as both commercial and open source.
1)JProfiler 2)App-perfect 3)JProbe are commercial..

one temparory solutions is to increase the jvm size to specified extent through JAVA_OPTS -Xms100m -Xmx300m.

JProfiler is quite good,use it..
here are some good links related to Memory leaks and tools.



http://www-128.ibm.com/developerworks/java/library/j-leaks/
http://www.codecomments.com/archive251-2004-9-287881.html
http://lists.osafoundation.org/pipermail/cosmo-dev/2005-December/000236.html

http://www.ej-technologies.com/download/overview.html---JProfiler site


Regards
Balakrishna
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by balakrishna billa:
I Think the problem with Memory leaks in the Applications....



It is not possible for us to say whether or not there is a leak in the original poster's application. We don't have enough information and it usually does more harm than good to speculate in these cases. It could just be that the application requires more memory than the default heap size.

As David mentioned, a profiling tool will help you to find out quickly and reliably if you have a memory leak. A poor mans alternative would be to increase the heap size of the app server and watch it over time. If, when the memory consumption gets close to what's been allotted, garbage collection runs and brings it back down, then there is a good chance that the increase in heap size was all that was needed. If, on the other hand, it is a memory leak, increasing the heap size will only postpone the problem.
 
chandrakanth boga
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ALL,

Thanks for your suggestions.
I got the solution.
The problem was in the code result set and prepared statements are not closed in the finally block.
My company has not provided any profiling tool as such.
So i went through the code manually and caught the problem.

Thanks to Dave/balakrishna/Ben Souther for their valualble suggestions
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic