Want more timely Centmin Mod News Updates?
Become a Member

Nginx PHP-FPM What service on Centminmod Server limits the time spent on download?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by RoldanLT, Jul 25, 2017.

  1. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    I have this direct download link produced by PHP script.
    I limit the download rate to 200kbps after downloading 5mb of the file (via nginx limit_rate).

    But after 5 minutes of downloading big files, I always receive this error:

    I've look on Nginx and PHP config, but I don't see any 5 minutes timeout settings.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    • which PHP download script is this ?
    • how you are downloading the file to see that output you quoted ?
    • is there any mysql database call for the download file ?
    • does the connection closed message happen if you remove nginx rate limit ?
    • does the connection closed message happen if you remove nginx rate limit + download the file directory via nginx instead of the PHP download script ?does the connection closed message happen if you download the file directory via nginx instead of the PHP download script ?
    • searched nginx and php-fpm configs outlined here for 300 seconds instead of 5 minutes ? or 280 seconds (4 min 40 seconds precisely). Is it always disconnecting around 4-5 minutes ?
    • checked the actual PHP download script for timeout settings ?
    • server behind any front end proxy like cloudflare, sucuri or nginx proxy caching etc etc ?
    • check nginx and php-fpm error logs outlined at Centmin Mod Configuration Files - CentminMod.com LEMP Nginx web stack for CentOS
     
    • Informative Informative x 1
  3. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    It's paid script from codecanyon.

    Free Download Manager - download everything from the internet

    I think yes for the Download count stats.

    Yes.

    No settings about this.

    No.

    I will try to look for some config settings now.
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    seems it uses MySQL too from change log listing on that page so mysql timeouts would be another thing to look at
     
  5. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    Nothing on nginx/php-fpm configs.
    :/
     
  6. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    I've look at my.cnf but no 200-300 seconds timeout declared there :|.
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    what if you download without a download manager and just from browser ? could be download manager is opening concurrent connections triggering CSF firewall in some way or if you have nginx connection limiting in place ?
     
  8. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    I tried it on Download manager because on Chrome Download same, I always got an error "Failed - Network error" after 5 minutes of downloading.
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,155
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    5:37 PM
    Nginx 1.13.x
    MariaDB 5.5
    what if you remove nginx rate limiting ?
     
  10. RoldanLT

    RoldanLT Well-Known Member

    3,899
    949
    113
    May 25, 2014
    Phillipines
    Ratings:
    +1,298
    Local Time:
    3:37 PM
    1.11
    10.2
    I have tried downloading it directly without php/mysql involve and it works fine.