Uploading Photo and PDF attachment in ERPNext running in Docker container on VPS is unbearably slow

We want to attache 1 Photo and 3 PDF files to each Item.

What is the optimum size for the Photo and PDF files?

Currently adding a Photo of 5 MB is taking around 5 and a half minutes to upload and attaching PDF files or 10 MB each, seems to freeze and never gets completed.

Are there any settings that I may have to do in Docker container or do I have to modify configuration of ERPNext?

Regards,

To start there’s this https://frappe.io/docs/user/en/guides/app-development/running-background-jobs

As well a search on ‘background’ plus ‘report’ ‘worker’ ‘scheduler’ will help inform you for eg Functions executed in background often gets stale document from frappe.get_doc/reload

This has nothing to do with Background processes.

Actually my question is that uploading attachments to a DocType is taking very long. This is due to the fact that ERPNext is setup in a Docker Container or there is some other problem?

Or do I may have to update the configuration on server manually?

Regards,