Images Processing on Django App

Greedings! Ive deployed succesfully a django app that im testing on Developer Plan. Im getting troubles when users import images, i have a form with 3 images fileds, some users get stuck on this screen after almost 1 minute, so i presume that its a timeout form server maybe? Images can have 1 MB to 5 MB and that was the moment Ive made a test with these images, 2:15 AM
9 Replies
Percy
Percy2y ago
Project ID: f9884495-05aa-4627-9aa2-388035471d64
rodrigorodriguesmarcolino
f9884495-05aa-4627-9aa2-388035471d64 I forgot to mention that in local environment the same images are imported normally, justo no production this is happening
Brody
Brody2y ago
railways upload (post request) timeout is 5 minutes, and gunicorn's default worker timeout is 30 seconds by default gunicorn spawns 1 sync worker with 1 thread, that means a long running process for one request would block subsequent requests
rodrigorodriguesmarcolino
@Brody ok, is there a way tô avoid this Through Railway or Django? I tested to send Just one image and the process didnt complete, got that same message "application failed to respond"
Brody
Brody2y ago
whats your start command
rodrigorodriguesmarcolino
i believe its the code on Procfile? Please correct me if i wrong, but If so, here it is: web: python manage.py migrate && python manage.py collectstatic && gunicorn healthbodycoach.wsgi
Brody
Brody2y ago
you have the default gunicorn config, play around with different amounts of workers, threads, and worker types
rodrigorodriguesmarcolino
Thanks i will take a look
Brody
Brody2y ago
sounds good
Want results from more Discord servers?
Add your server