• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Connection reset by peer

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application where i am using database connection through Driver Manager i.e. i am not using any Connection pool.
The application performs database operation like selecting data from a table and then update another table .
This program run randomly undergo following error :-
java.sql.SQLException: Connection reset by peer: JVM_recv in socket input stream read

In order to solve it i have taken the following actions
(a) I used the connection pool using Weblogic 7.0.
When i run the program it gave me the following error :
"out of Memory Error"

Hence i increased the heap size of Weblogic 7.0 by updating the
startWLS.cmd .
Here i updated the following variable :
set MEM_ARGS=-Xms512m -Xmx512m

But after implementing this it is still giving me the "out of Memory Error"

I know again switched back with my origanal code that is Connecting through Driver manager.

Can anaybody help me and suggest how can i resolve this problem.
thanks in advance.
 
Bartender
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U might me trying to use the same connection object to create statement and somewhere it is being closed or some of it's constituents has been closed.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While u r accessing the server, if it is restarted, the exception will be raised.
 
AmitKumar Kumar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.

But if the Statement is closed anywhere how the program works properly most of the time.I mean to say if i excute this program for 10 times it works fine for 8 times .Infact in the development environment it has never failed .It is happening only in production server.
 
Ranch Hand
Posts: 1143
1
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kumar,
An "OutOfMemoryError" usually indicates a memory leak in your application. The usual way to locate the cause of a memory leak is to use a profiler. For your information, the JavaPerformanceTuning Web site has a lot of information on profilers for java applications.

Good Luck,
Avi.
 
You know it is dark times when the trees riot. I think this tiny ad is their leader:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!