How to set timeout for Wm SFTP

I would like to set a timeout for SFTP in order to better control the time spent by SFTP files. How could I implement it in Wm?

Hi Aaron ,

You can use the OOTB SFTP feature provided by webMethods.

On the IS Administrator page , go to Settings -->SFTP then create server alias and provide all the details.

Then create the User Alias settings for the Server alias created , in the user alias setting you can provide the details for

  • No. of retries
  • Connection Timeout
  • Session Timeout

and other details.

After defining the user alias and server alias. You can make use of pub.client.sftp.* services to code according to your requirement.

Hi Kumar,

Thx so much. I checked the means of Connection timeout and session timeout thru offical manual. But still can’t understand. Could you help explain with examples?

Timeout (seconds)
The amount of time (measured in seconds) Integration
Server waits for a response from the SFTP server before
timing out and terminating the request. The default is 0,
which indicates that the session will never time out.
Session Timeout
The number of minutes you want Integration Server to wait
before terminating an idle session. The default is 10 minutes.

Connection Timeout : This triggers , when Integration server sends a request to the SFTP server to login , but Integration Server does not receive any response from the SFTP server. The Integration Server will wait for the time specified in the connection timeout to receive any response from SFTP server. If no response is received within the configured time. Integration server will terminate the request.

Session Timeout : When we successfully login to the SFTP server , then a session will be created . If the session created is unused i.e. idle for the time specified in the session timeout value. Then the session will be terminated and the user will be logged out from the SFTP server.

Hi Kumar,

In your understanding, session timeout value is for idle session created. But my requestment is to set an timeout which could help me control the whole SFTP time-spent. For example, I would like to set the total time-spent from SFTP log-in to log-out as 10min. If SFTP process exceeds 10min, I expect an error which could be catched. if less than 10min, it is ok for me then.

Hi Aaron,

looks like there is no direct parameter for this type of timeout.

An option might be to encapsulate the SFTP-Handling in a dedicated service and trigger this one by pub.publish:publishAndWait from the calling service.
Upon completion the triggered service should call pub.publish:reply to inform the calling service that it is finished.

The calling service will retrieve a timout exception when the repyl is not received in time, which can then be handled.

See IntegrationServer Built-In-Services Guide for details for the mentioned services.


1 Like

You can wrap SFTP activities in a separate service , then you can use the timeout property of the flow service.

call the wrapper service in a top level service and specify the timeout value for this step.

or you can use the suggestion given by Holger as well.