Occasional 502 Bad Gateway When Uploading
I'm new to running and maintaining my own server.
I noticed that in my web app, uploading images at a fast speed (i.e. consecutively without waiting for the previous images to finish uploading) sometimes causes my web app to crash with a 502 Bad Gateway error.
Once I refresh the page after this error, everything is OK.
If I upload at normal speeds, everything is fine.
In development mode/localhost, pace of upload is never a problem.
Is this an app issue? Or a server issue? Is this caused by not having a powerful-enough server?
If this is caused by a weak server. How can I tell? Also how do I figure out what I need to upgrade Droplets to in order to prevent this issue?