502 : Bad Gateway error on uploading files erpnext

Hello Frappe Team,

Whenver uploading data/image on ERPNext which always shows 502 gateway error. not able to upload files.

Getting the same error.
Did you manage to solve this?

works for small files though