• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connection reset by peer

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 361
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Because those who mind don't matter and those who matter don't mind - Seuss. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic