So on the same beginning pls configure your environment in the following way:
Install the HFix-39385 JVM Crash/OOM on large attachment uploads. I attached the DL item which contains this HF. And follow below instruction:
Customer receives DL containing the hotfix
Customer installs hotfix via Designer Studio
Create settings to direct attachments to the newly configured storage. These can be created as Data-Admin-System-Settings by the customer:
Customer creates the following Data-Admin-System-Settings:
To start the upload process, simply move the attached file into the target directory /local/pega-work/sync-data/* (this is the default directory available on all Pega instances). And from this local dir, the whole catalog structure along with the files will be synced automatically with the S3 bucket. The attachments stored in S3 will be protected and secured through ACL(access control list) on the bucket and any unauthorized user can't access it. So we can assume that the S3 bucket in this configuration is acting as a repository of the attachments. And in case of the multi-node configuration, or in when the node termination appears, they files will be always automatically synced across the cluster. The best practice is to work on the files which are stored on the local system. And if you are interested about the example of Java activity, please take a look at the MoveFileToListeners.java
And there is also a solution like below:
Introduction Customers need the ability to upload and download files between their local systems and their Cloud 2.x environments. An SFTP server provides a standard method for these file transfers. The SFTP server and the Pega node tier machines connect to a shared file space backed by the S3 data bucket.
The SFTP server is a standard Amazon Linux EC2 inside of an AutoScaling Group behind an Elastic Load Balancer. The sshd service is modified so that a single user, sftp-user, can SFTP into the server. The user is limited to SFTP-only usage, i.e. the user cannot SSH into the system. Upon provisioning, a public SSH key is supplied for the user via SftpUserPublicKey. The private key must be present where the SFTP session originates.
S3 data bucket
The S3 data bucket contains a location that is shared between the SFTP server, and Pega node tier machines. It is s3://<bucketname>/USERID/PACID/environment/transfer. This location is mounted on the SFTP server as /home/sftp-user/pegafiletransfer. On Pega node tier machines, it is mounted as /local/pega-work/sync-data.