Hello,

I'm encountering the following message in my logs when two instances of a Java 
application running Camel on separate servers (to ensure HA) are trying to poll 
an sFTP server to process a file:

Cannot acquire read lock within 20000 millis. Will skip the file: 
RemoteFile[name and path of file on sFTP server]

The route URI is like this:

sftp://<user>@<server>:<port>/<path>?connectTimeout=120000&delay=60s&delete=true&disconnect=true&ignoreFileNotFoundOrPermissionError=true&inProgressRepository=<repository>&include=<mask>&password=<password>&readLock=changed&readLockMinAge=10s&soTimeout=300000

The process copies the file to a local shared folder where it is further 
processed by routes running on the same 2 Java applications with a URI like 
this:

file://<path>?delay=60s&inProgressRepository=<repository>&include=<mask>&readLock=changed&readLockMinAge=10s

... where I also get the same message:

Cannot acquire read lock within 10000 millis. Will skip the file: 
GenericFile[name and path of file on shared folder]

Eventually the file is processed but it is taking several polls before one of 
the applications processes the file, leading to delays.

Can anyone advise what the issue is and how I can fix it, please?

I'm using Camel v 2.24.2.

Thanks,

Mark

Reply via email to