Skip to Content
avatar image
Former Member

How to archive a file which exceeds the max restriction file size in SFTP adapter

we have a requirement to process files below 500 MB and if there are any files above 500 MB then an error should be triggered and eventually the file should be archived.

Based on the above requirement, error is getting triggered but not able to archive the file using standard methods of archiving.

If we check maximum file size restriction and mention the size as 524288000 Bytes

and also check error when restricted option then,

whenever a file exceeds this limit the channel goes into error state.

Please provide a solution to archive such files from the directory as and when the channel goes into error state due to the large files.

capture1.png (13.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    Apr 05, 2016 at 09:11 AM

    Hi Mayuri,

    What is your SFTP addon version?, you can upgrade it and to use the the "Bypass PI Runtime for File Transfer", check this link SFTP Adapter - Handling Large File

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 05, 2016 at 07:41 AM

    Hi Mayuri,

    You can check the condition at receiver level and if the size is > than 500MB you send it to archive folder else send to target.

    Regards

    Gagan


    pastedImage_0.png (11.6 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Gagandeep Batra

      Hi Gagan,

      I have tried this option but if we set a max size then any file exceeding max size is not treated as faulty file, rather it is ignored by the adapter.

  • Apr 05, 2016 at 09:24 AM

    Hi Mayuri,

    Since adapter is getting in error better to request sender to limit the size of the file from their side. Other way round is to run a script from PI server at regular hours. The script checks the file size in source directory of server. Moves the eligible files to a new folder from where SFTP adapter will pick up the file. You can check this link for sample scripts Google Groups

    Regards

    Anupam

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 08, 2016 at 10:33 AM

    Hi Everyone,

    Thanks for the fast response.

    We tried to resolve this requirement using Chunk Mode and running script before message processing- which would copy the files to archive folder and running a second script after message processing to delete the message from the source folder.

    But this solution didnt seem quite reliable going forward(according to our architects)

    Hence trying to explore Bypass PI runtime mode as explained in SFTP Adapter - Handling Large File.

    Thank you

    Mayuri

    Add comment
    10|10000 characters needed characters exceeded