I generate Image with Celery task in this code. this is the part of an ajax view function.
task_result = generate_result_image.apply((answer, combi.id, lang))
if task_result.state == "SUCCESS":
response['ok'] = 'yes'
return HttpResponse(json.dumps(response), content_type='application/json')
this is working locally perfectly, but in prod server, i am getting 502 bad gateway. this is the browser console msg:
what am I doing wrong? this is really mysterious..
this is the uwsgi log, the line where the cursor stands is the call I am doing. I seems, the worker is dying right after my call... no idea why..