Upload large files failed with "ResponseText: 504 Gateway Time-out"

5,095

1.I think you might have one of the following :

1.1 Misconfiguration in upload settings .

1.2 Some kind of network packet fragmentation

2.You can test this further following these steps :

2.1.See the time pattern for the error .

2.2.See if it's a size pattern (files over 100 mb or something like that )

For point 1.1. You could play with the settings after you complete point 2. For point 1.2. You could try to copy a file in the local network after you have the upper limit for the upload , then try to copy it outside your network if applicable .

Share:
5,095

Related videos on Youtube

apasajja
Author by

apasajja

Updated on September 18, 2022

Comments

  • apasajja
    apasajja almost 2 years

    server setting:

    Ubuntu server 10.10
    using nginx 0.7.67
    PHP 5.3.3 with PHP-FPM
    Drupal 7 site. 
    post_max_size = 1000M
    upload_max_filesize = 1000M
    max_execution_time = 3600
    request_terminate_timeout = 3600s  <---this is PHP-FPM setting
    

    When uploading from local PC to server, the upload bar suddenly stop and a popup message come up:

    An AJAX HTTP request terminated abnormally.
    Debugging information follows.
    Path: /file/ajax/field_vid/und/0/form-E3f71tOgO8ZCiQgVryNSshhFe8Xl4ieBkJJswXjSgwA
    StatusText: n/a
    ResponseText: 
    ReadyState: undefined
    

    The popup message come 30 sec to 60 sec after clicking "upload" button.

    Maybe this related with upload from local PC. So, I try to upload remotely. It fails too with a popup message:

    An AJAX HTTP request terminated abnormally.
    Debugging information follows.
    Path: /file/ajax/field_vid/und/0/form-i9q-9xhs7bR9v9GMaqF9Z4Jyh8E5gIzjA4qMlRRR7cM
    StatusText: n/a
    ResponseText: 504 Gateway Time-out
    nginx/0.7.67
    
    ReadyState: undefined
    

    I've done searching on the net and has tried many solution with no luck

    --------added

    If 504 Gateway error usually the server-side fault. If PHP has been configured fine, it must be other problem.

    Since the error popup is from ajax, I think this maybe related to something missing. FYI, the server dont have any "upload progress" package installed.

    (the upload progress bar still works even without installing any "upload progress" package)

    Installing upload progress in nginx is involving reinstall make me think twice to do it. Do you think upload progress is mandatory in this case?

  • apasajja
    apasajja about 12 years
    1.1 Upload setting is correct. Upload limit inherit PHP (1000MB). 1.2 Have tried, but same result. 2.1 The error come sometime more than one minute. I think this not because nginx or PHP misconfiguration. 2.2 Have tried many size: 5MB, 15MB, 45MB, 74MB, and 600MB. Only 5MB (from local PC) and 15MB (from other server) successfully uploaded. I think both of the files can be uploaded because not require long time
  • Alex H
    Alex H about 12 years
    Yes , it could be a timeout set or a size limitation . I would speak with the "network guy" , he might be able to help you here .