I am uploading a csv containing 60k records and importing them into postgres db using Ecto. It works fine on local. However, on production, I get this error in the log after importing several thousand records and I get 502 bad gateway.
It is probably exceeding the timeout. How are you loading the 60k records? Are you doing 60k individual inserts? Ideally you want to use insert_all for this kind of thing and insert in batches of ~2000.