CLOSE-WAIT issue

119 views
Skip to first unread message

nelson....@gmail.com

unread,
Jan 13, 2021, 9:42:26 AM1/13/21
to iDempiere
Does anyone experience any CLOSE-WAIT sockets issue in iDempiere?

I have iDempiere 7.1 running in CentOS 7 with OpenJDK 11.0.9.11. In the past few days, I notice that the iDempiere instance leaves a lot of "CLOSE-WAIT" sockets:

# ss -an|grep CLOSE-WAIT
tcp    CLOSE-WAIT 1      0        [::ffff:192.168.123.1]:8080                 [:
:ffff:192.168.123.1]:57908
tcp    CLOSE-WAIT 1      0        [::ffff:192.168.123.1]:8080                 [:
:ffff:192.168.123.1]:57178
tcp    CLOSE-WAIT 1      0        [::ffff:192.168.123.1]:8080                 [:
:ffff:192.168.123.1]:60006
tcp    CLOSE-WAIT 1      0        [::ffff:192.168.123.1]:8080                 [:
:ffff:192.168.123.1]:59912
tcp    CLOSE-WAIT 1      0        [::ffff:192.168.123.1]:8080                 [:
:ffff:192.168.123.1]:60322

The server has been running for around 12 hours and there are 300+ close-wait sockets already.

Anyone has suggestions on why the sockets are not closed?

Nelson Chan

Martin Schönbeck

unread,
Jan 14, 2021, 6:10:13 AM1/14/21
to iDempiere
Hi Nelson,

nelson....@gmail.com schrieb am Mittwoch, 13. Januar 2021 um 15:42:26 UTC+1:
Does anyone experience any CLOSE-WAIT sockets issue in iDempiere?


I have 250 entries on a system with 7.1 running for six hours and 2400 on a system with 8.2 running for some days.

Anyone has suggestions on why the sockets are not closed?

If you compare the result with some minutes in between,  you'll see that old entries vanisch and new ones appear. So they are closed sometimes, but they stay there very long.

Regards,
Martin

nelson....@gmail.com

unread,
Jan 14, 2021, 9:05:55 AM1/14/21
to iDempiere
But a "normal" application should not hold on so many close-wait connections. What are the connections waiting for? Free threads to finish some work? Or wait for GC to close the connections on behalf?

I have a concern on this behaviour since a few days ago the iDempiere instance ran out of file handlers (ulimit is set to 1024) and most of the file descriptors were used by those close-wait connections.

Nelson Chan

Carlos Antonio Ruiz Gomez

unread,
Jan 14, 2021, 11:02:52 AM1/14/21
to idem...@googlegroups.com
Hi,

I did a test checking in test.idempiere.org

Each logout is adding one CLOSE-WAIT to the list

I tried with nginx enabled - the CLOSE-WAIT is added with the port 8080

Tried without the nginx enabled, direct connection to jetty, in this case the CLOSE-WAIT is added with the port 8443.

Regards,

Carlos Ruiz



Am 14.01.21 um 15:05 schrieb nelson....@gmail.com:

Martin Schönbeck

unread,
Jan 14, 2021, 11:20:00 AM1/14/21
to iDempiere
Hi,

it's not only the logout. I restarted our local iDempiere at 09:57, logged in a 12:07. Upto then there were no CLOSE-WAIT. Short after login the first one appeared. Now I have 149. Beside me no one was logged in and I was logged in since then. All are connections to my notebook. New ones appear every two minutes when the comet call ist cancelled and restarted.

Regards,
Martin

nelson....@gmail.com

unread,
Jan 14, 2021, 11:34:35 AM1/14/21
to iDempiere
I do more testings and it seems this issue does not happen with the original 7.1 release (downloaded from: http://sourceforge.net/projects/idempiere/files/v7.1/server/idempiereServer7.1.gtk.linux.x86_64.zip/download). But if I use the binary compiled from the latest git source, the issue occurs once I login and logout iDempiere.

So I believe some changes in IDempiere since the original 7.1 release triggers this issue.

Nelson Chan

Heng Sin Low

unread,
Jan 14, 2021, 10:00:46 PM1/14/21
to idem...@googlegroups.com
this might be cause by the fix for https://idempiere.atlassian.net/browse/IDEMPIERE-4625

will test further ...

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/0331d37f-383a-60fe-da4c-ec04122c78ba%40gmail.com.

hengsin

unread,
Jan 15, 2021, 3:52:27 AM1/15/21
to iDempiere

nelson....@gmail.com

unread,
Jan 18, 2021, 9:00:32 AM1/18/21
to iDempiere
Is there any plan to backport the fix to 7.1? Or I'll need to manually update the 7.1 source code and recompile it myself?

We plan to stay in 7.1 a little bit longer before we move on to 8.X.

Nelson Chan

Reply all
Reply to author
Forward
0 new messages