It's all about the answers!

Ask a question

java.net.SocketTimeoutException from work item save in stand-alone Java application


Geoff Alexander (19623948) | asked Feb 11 '14, 3:16 p.m.
We have a stand-alone Java application that uses the RTC SDK to create and/or update custom work items.  Occasionally, our application encounters a java.net.SocketTimeoutException when performing a work item save via WorkItemWorkingCopy.save(null) on our custom work items, especially on heavily load / slow RTC servers.  The RTC project area runs a number of custom operation advisors and participants.  I'm working to improve the performance of our custom operation advisors and participants.  However, it would really be helpful if we could increase the socket timeout for work item saves from our stand-alone Java application.  Is this possible?  If so, how?

Thanks,
Geoff Alexander

One answer



permanent link
Geoff Alexander (19623948) | answered Feb 12 '14, 1:48 p.m.
edited Feb 12 '14, 1:49 p.m.
To answer my own question, I found two ITeamRepository methods, getConnectionTimeout() and setConnectionTimeout(int timeoutInSeconds), for getting and setting the connection timeout.  In calling getConnectionTimeout(), I found that the default connection timeout for my RTC repository is 480 seconds.  I was able to use setConnectionTimeout(int timeoutInSeconds) to set the connection timeout a larger value.

Comments
sam detweiler commented Feb 12 '14, 2:34 p.m.

yep, ran into the same problem a few weeks back.. the timeout value is the TOTAL TIME connected, NOT the API call time.

my app takes 20-28hours...(480 seconds just ain't long enough!)


Geoff Alexander commented Feb 12 '14, 3:36 p.m.

Our application is a long running, transactional based server that connects / disconnects from RTC as it processes certain transactions.  Usually, 480 seconds is long enough.  But occasionally more time is required, especially, when debugging Java code running on the RTC server.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.