NGINX Timeout Configuration

dudefromearth

New Member
Joined
Dec 14, 2022
Messages
2
Reaction score
0
Credits
21
Hello Everyone

I would like to know if it is possible to configure NGINX to set a timeout for long file uploads.

I have already tried the following parameters in nginx.conf but doesn't work:

uwsgi_connect_timeout 10s;
uwsgi_read_timeout 10s;
proxy_connect_timeout 10s;
proxy_send_timeout 10s;
proxy_read_timeout 10s;
fastcgi_send_timeout 10s;
fastcgi_read_timeout 10s;

Does anyone have the right parameter?
 


dos2unix

Well-Known Member
Joined
May 3, 2019
Messages
1,652
Reaction score
1,265
Credits
10,737
How long.. is a long upload?
I regularly upload 9 or 10GB files, and it never timesout.

The parameters you set in your example would only affect the uploads if you are using
a proxy or cgi_bin application to do the uploads. But you shouldn't have to change any of those.

Do you have a send_timeout set?
Do you have a client_max_body_size set?
 
OP
D

dudefromearth

New Member
Joined
Dec 14, 2022
Messages
2
Reaction score
0
Credits
21
How long.. is a long upload?
I regularly upload 9 or 10GB files, and it never timesout.

The parameters you set in your example would only affect the uploads if you are using
a proxy or cgi_bin application to do the uploads. But you shouldn't have to change any of those.

Do you have a send_timeout set?
Do you have a client_max_body_size set?
I would like to set a timeout for long file uploads.

As an example: I'm uploading a 10GB file, but if the upload takes longer than 20 seconds, I want Nginx to stop.

I have set the send_timeout and also the client_max_body_size, even though I set them the file is still uploading.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,306
Reaction score
3,925
Credits
38,697
Browsers aren't actually designed for big file-uploads, that's the reason file-sharing protocols such as ftp(s) and sftp were created. Although I think now days browsers can deal with a lot more than in the time browsers were still 32 bit.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Staff online

Members online


Top