Uploading large images

Hi, I have a problem to upload image larger then 3MB. Firstly, I thought it’s problem of Nginx configuration.

Nginx error log shows problem upstream:
2020/03/16 08:19:37 [error] 17903#17903: *631 upstream prematurely closed connection while reading response header from upstream, client: 89.177.141.244, server: slavkakratka.do.netvarec.cz, request: “POST /dashboard/records/13 HTTP/1.1”, upstream: “http://127.0.0.1:3001/dashboard/records/13”, host: “slavkakratka.do.netvarec.cz”, referrer: “https://slavkakratka.do.netvarec.cz/dashboard/records/13/edit

Do you know, what to do with that?