my web app keeps throwing a 504 gateway timeout when querying a large database. how do i increase the timeout limit in nginx?
hey, i had this exact problem last month! you wanna look for `proxy_read_timeout` in your nginx config. put it in the `http`, `server`, or `location` block. usually default is 60s, i bumped mine to like 300s for a really heavy report. also check `proxy_connect_timeout` and `proxy_send_timeout` just to be safe. but honestly, it might also be worth checking why the query is taking so long, timeouts just hide the issue sometimes.