(JPA / Toplink) IOException network error: address already in use: connect

I have a JPA project that worked. This month I added some data to my database. When I start a normal job (I have been working for several months), I get this error:

Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException Internal exception: java.sql.SQLException: network error IOException : address already in use: connect Error code: 0

I checked my LocalPersistenceFacade, which contains most of the methods that I call, by printing the counter, and I get the exact number of closed and open links there: 457. And then my work crashes. Usually it should go to 601, not 457.

On the database side there is no information related to a possible failure. Everything seems to be correct, but my Java code says something else.

Does anyone have any ideas?

Regards, Jean

+5
source share
1 answer

I understand that you open / close the connection for each line, and the problem you are facing looks like the one described in this page :

Possible reasons

When working with large amounts of data through cards with multiple functions. Windows does not close fast enough connections that exclude network I / O.

Recommendations

Change the following two values ​​in the Windows Registry:

Windows . 5000. , Windows . , 1025 . 1025 .

:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
: MaxUserPort : REG_DWORD
: 5000-65534

"" . Windows TIME_WAIT 240 . , MaxPort : " " , TIME_WAIT. , .

:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
: TcpTimedWaitDelay Data
: REG_DWORD : 30-300

- - . , "" , ( , c3p0 DBCP). .

+4

All Articles