0

I have been using apache for a django project. I need to upload a very large file in application. But I am getting Gateway timeout error 504.

I am using Centos7, httpd2.4, mos_wsgi, python3.48

#myapp.conf Alias /static /opt/grameenphone-torque/static <Directory /opt/grameenphone-torque/static> Require all granted </Directory> <Directory /opt/grameenphone-torque/xcg_is> <Files wsgi.py> Require all granted </Files> </Directory> WSGIDaemonProcess xcg_is python-path=/opt/grameenphone-torque:/opt/grameenphone-torque/env/lib/python3.4/site-packages request-timeout=6000 connect-timeout=6000 queue-timeout=6000 WSGIProcessGroup xcg_is WSGIScriptAlias / /opt/grameenphone-torque/xcg_is/wsgi.py 
4
  • You set very short timeouts. You should increase those. Commented Apr 12, 2018 at 16:49
  • is 6000 in seconds or milliseconds ? Can you please tell me ? I want to set it for 30 minutes. Commented Apr 12, 2018 at 19:04
  • Those are milliseconds. So you need a lot more zeroes. Commented Apr 12, 2018 at 19:34
  • Now I tried with 600000 but did get same result. After almost 60 seconds I got 504 gateway error. Commented Apr 12, 2018 at 21:38

1 Answer 1

1

Just add needed TimeOut to your VirtualHost section. https://httpd.apache.org/docs/2.4/en/mod/core.html#timeout. Like:

<VirtualHost *:443> AllowEncodedSlashes On .... TimeOut 600 .... 

Cause default is exactly 60 seconds

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.