I am using nginx and node server to serve update requests. I get a gateway timeout when I request an update on large data. I saw this error from the nginx error logs :
<
In my case, I tried to increase the timeout in the configuration file, but did not work. Later turned out it was working when filtering for less data to display on one page. In the views.py, I just added " & Q(year=2019)" to only display the data for the year 2019. BTW, a permanent fix would be using Pagination.
def list_offers(request, list_type):
context = {}
context['list_type'] = list_type
if list_type == 'ready':
context['menu_page'] = 'ready'
offer_groups = OfferGroup.objects.filter(~Q(run_status=OfferGroup.DRAFT) & Q(year=2019)).order_by('-year', '-week')
context['grouped_offers'] = offer_groups
return render(request, 'app_offers/list_offers.html', context)