Welcome to Centmin Mod Community
Register Now

Nginx PHP-FPM Operation timed out after 30001 milliseconds with 0 bytes received

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Aug 25, 2019.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:29 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    On latest Centos 7 and latest Centminmod with latest Nginx and latest php 7.3.x i have an error when i am trying to upload a pdf file of 80mb on my Invision forum...

    My connection is fine as i can upload the same file on other online data storage providers...

    It seems that there is an issue with a timed out value somewhere...

    The max upload file size is higher and i try to use a value of 300 for max execution time and max input time but nothing :(

    [​IMG]

    Any ideas?

    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    41,349
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    4:29 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Is Invision using curl in PHP for something for uploads ? check for timeout values in php code
    Code (Text):
    cd /path/to/invision/forum/web/root
    grep -rin 'CURLOPT_'
    

    see if any timeouts set?
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:29 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    That's the output:

    Code:
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Configuration.php:141:     * CURLOPT_SSLVERSION values.
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Configuration.php:184:     * can be any of the CURLOPT_PROXYTYPE options in PHP cURL.
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:124:        curl_setopt($curl, CURLOPT_TIMEOUT, $this->_config->timeout());
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:125:        curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $httpVerb);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:126:        curl_setopt($curl, CURLOPT_URL, $url);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:129:            curl_setopt($curl, CURLOPT_ENCODING, 'gzip');
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:132:            curl_setopt($curl, CURLOPT_SSLVERSION, $this->_config->sslVersion());
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:147:            curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:148:            curl_setopt($curl, CURLOPT_USERPWD, $authorization['user'] . ':' . $authorization['password']);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:154:            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:155:            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:156:            curl_setopt($curl, CURLOPT_CAINFO, $this->getCaFile());
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:164:            curl_setopt($curl, CURLOPT_POSTFIELDS, $requestBody);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:173:            curl_setopt($curl, CURLOPT_PROXY, $proxyHost . ':' . $proxyPort);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:175:                curl_setopt($curl, CURLOPT_PROXYTYPE, $proxyType);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:178:                curl_setopt($curl, CURLOPT_PROXYUSERPWD, $proxyUser . ':' . $proxyPwd);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:182:        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:183:        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:244:            CURLOPT_POST       => true,
    applications/nexus/sources/Gateway/Braintree/lib/Braintree/Http.php:245:            CURLOPT_POSTFIELDS => implode("\r\n", $body)
    system/3rd_party/tcpdf/include/tcpdf_static.php:2502:                           curl_setopt($cs, CURLOPT_URL, $f);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2503:                           curl_setopt($cs, CURLOPT_BINARYTRANSFER, true);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2504:                           curl_setopt($cs, CURLOPT_FAILONERROR, true);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2505:                           curl_setopt($cs, CURLOPT_RETURNTRANSFER, true);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2507:                                   curl_setopt($cs, CURLOPT_FOLLOWLOCATION, true);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2509:                           curl_setopt($cs, CURLOPT_CONNECTTIMEOUT, 5);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2510:                           curl_setopt($cs, CURLOPT_TIMEOUT, 30);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2511:                           curl_setopt($cs, CURLOPT_SSL_VERIFYPEER, false);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2512:                           curl_setopt($cs, CURLOPT_SSL_VERIFYHOST, false);
    system/3rd_party/tcpdf/include/tcpdf_static.php:2513:                           curl_setopt($cs, CURLOPT_USERAGENT, 'TCPDF');
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:88:        } elseif (defined('CURLOPT_POST')) {
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:90:            curl_setopt($ch, CURLOPT_POST, true);
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:91:            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:92:            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/x-www-form-urlencoded'));
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:93:            curl_setopt($ch, CURLOPT_POSTFIELDS, $postBody);
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:94:            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);
    system/3rd_party/Minify/lib/Minify/JS/ClosureCompiler.php:95:            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);
    system/Http/Request/Curl.php:105:                               CURLOPT_HEADER                  => TRUE,                                                                // Specifies that we want the headers
    system/Http/Request/Curl.php:106:                               CURLOPT_RETURNTRANSFER  => TRUE,                                                                // Specifies that we want the response
    system/Http/Request/Curl.php:107:                               CURLOPT_SSL_VERIFYPEER  => FALSE,                                                               // Specifies that we don't need to validate the SSL certificate, if applicable (causes issues with, for example, API calls to CPanel in Nexus)
    system/Http/Request/Curl.php:108:                               CURLOPT_TIMEOUT                 => $timeout,                                                    // The timeout
    system/Http/Request/Curl.php:109:                               CURLOPT_URL                             => (string) $this->url,                                 // The URL we're requesting
    system/Http/Request/Curl.php:115:                               curl_setopt( $this->curl, CURLOPT_USERPWD, $user . ':' . $pass );
    system/Http/Request/Curl.php:140:                               CURLOPT_HEADER                  => TRUE,                                                                // Specifies that we want the headers
    system/Http/Request/Curl.php:141:                               CURLOPT_HTTP_VERSION    => $httpVersion,                                                // Sets the HTTP version
    system/Http/Request/Curl.php:142:                               CURLOPT_RETURNTRANSFER  => TRUE,                                                                // Specifies that we want the response
    system/Http/Request/Curl.php:143:                               CURLOPT_SSL_VERIFYPEER  => FALSE,                                                               // Specifies that we don't need to validate the SSL certificate, if applicable (causes issues with, for example, API calls to CPanel in Nexus)
    system/Http/Request/Curl.php:144:                               CURLOPT_TIMEOUT                 => $timeout,                                                    // The timeout
    system/Http/Request/Curl.php:145:                               CURLOPT_URL                             => (string) $this->url,                                 // The URL we're requesting
    system/Http/Request/Curl.php:170:                       CURLOPT_HTTPAUTH                => CURLAUTH_BASIC,
    system/Http/Request/Curl.php:171:                       CURLOPT_USERPWD                 => "{$username}:{$password}"
    system/Http/Request/Curl.php:192:                                       curl_setopt( $this->curl, CURLOPT_COOKIE, $v );
    system/Http/Request/Curl.php:196:                                       curl_setopt( $this->curl, CURLOPT_ENCODING, $v );
    system/Http/Request/Curl.php:200:                                       curl_setopt( $this->curl, CURLOPT_REFERER, $v );
    system/Http/Request/Curl.php:204:                                       curl_setopt( $this->curl, CURLOPT_USERAGENT, $v );
    system/Http/Request/Curl.php:219:                       curl_setopt( $this->curl, CURLOPT_HTTPHEADER, $extra );
    system/Http/Request/Curl.php:235:                       CURLOPT_SSL_VERIFYHOST  => ( $value ) ? 2 : FALSE,
    system/Http/Request/Curl.php:236:                       CURLOPT_SSL_VERIFYPEER  => (boolean) $value
    system/Http/Request/Curl.php:258:                   curl_setopt( $this->curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2 );
    system/Http/Request/Curl.php:266:                   curl_setopt( $this->curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1 );
    system/Http/Request/Curl.php:283:               curl_setopt( $this->curl, CURLOPT_HTTPGET, TRUE );
    system/Http/Request/Curl.php:288:                       curl_setopt( $this->curl, CURLOPT_POSTFIELDS, $data );
    system/Http/Request/Curl.php:304:               curl_setopt( $this->curl, CURLOPT_POST, TRUE );
    system/Http/Request/Curl.php:307:               curl_setopt( $this->curl, CURLOPT_POSTFIELDS, $this->_dataToSend( $data ) );
    system/Http/Request/Curl.php:322:               curl_setopt( $this->curl, CURLOPT_CUSTOMREQUEST, 'HEAD' );
    system/Http/Request/Curl.php:325:               curl_setopt( $this->curl, CURLOPT_NOBODY, true );
    system/Http/Request/Curl.php:343:               curl_setopt( $this->curl, CURLOPT_CUSTOMREQUEST, mb_strtoupper( $method ) );
    system/Http/Request/Curl.php:348:                       curl_setopt( $this->curl, CURLOPT_POSTFIELDS, $this->_dataToSend( $params[0] ) );
     
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:29 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Didn't solve that yet :(

    Users can't upload big files (around 100mb) to Invision forum and i already increase the max execution time and max input time and max upload size :(

    I think it is limited by time and not by size but i am not sure where and how.

    I have the same issue on a second server....

    Any other ideas?
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,349
    9,279
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,236
    Local Time:
    4:29 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Are you behind cloudflare ? if so cloudflare has max upload limit size depending on cf plan used. For free and pro max upload limit is 100MB How can I change the client maximum upload size?
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    3,443
    329
    83
    May 31, 2014
    Ratings:
    +627
    Local Time:
    9:29 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Yes i know but i am getting this issue at 70-80mb files also ...