File upload - gateway timeout problem

Hi,

I edited the user.ini file as well as php,ini of the site with optimal values as suggested by owncloud manual pages, however still uploading even a 250 MB file returns in a gate-way time out error.

Please check http://elentech.com/Filemanagement/info.php for my current php settings of the site, am i missing something ?

Hi,

if you have a look at the ownCloud manual there are way more config options causing such timeouts then the ones in .user.ini and php.ini. There is also a another FAQ available here providing additional info:

HI,

I checked all the settings, still issue persists,
I set up session_keepalive to true in config.php, this is the user.ini file contents

upload_max_filesize=6G
post_max_size=6G
memory_limit=6G
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
max_execution_time= 21600
max_input_time= 21600

Even a 120 MB file gets the gateway time out error after upload, however when i log off and log in again , the uploaded file is there, so it is certainly a script timeout, but i am not sure where is the settings.

As recommended please read the documentation as well as the linked FAQ. There are various settings involved here, not only the PHP ones (e.g. webserver timeout settings etc.).

If unsure contact the support of your hoster about this issue. They might have additional knowledge about your issue.

You should also be aware that you're running ownCloud on CGI/FastCGI. ownCloud is not tested and is unsupported on such an environment. You're mostly on your own when hitting such issues as long as no one with a similar setup is able to help you how to fix your webservers config.

(Replying this question since I encounter this (old) issue similar to 504 Gateway Time-out to MOVE .file · Issue #31633 · owncloud/core (github.com) and it’s locked)

Are you using httpd? If yes:
Check httpd log (/var/www/httpd/error_log in my case), did you encounter this error?

[proxy_fcgi:error] [pid 634604:tid 140460127418112] (70
007)The timeout specified has expired: [client {IP}:48798] AH01075: Error dispatch
ing request to : (polling)

If it checks out, add TimeOut parameter to your httpd.conf ( /etc/httpd/conf/httpd.conf in my case, you can locate it using httpd -V in -D HTTPD_ROOT and -D SERVER_CONFIG_FILE ) for example:
TimeOut 1800

Adjust this parameter to your needs (in this example 1800 seconds).

The reason of the problem and how I found out is (quoting from this issue’s comment):

the MOVE operation for big files can take quite some time. It is likely that your setup believed that the connection was dead as it wasn’t sending anything and decided to kill it. Maybe try increasing the timeout.

Before that, the browser console throws me MOVE error 504 Gateway Timeout.

I hope this reply helps someone in the right direction.

1 Like