Forum Moderators: coopster

Message Too Old, No Replies

Timeouts When Uploading Attachments

         

jimmy058910

6:29 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



Hi,

I am on a dedicated server and this is the last thing I need to 'get right' before I release my site to the public and it's the most important so any help is much appreciated!

Before I moved to CloudFlare, I tested a file of 211MB in size as an upload and it worked and worked fast. After I moved, it times out almost exactly 30 seconds from when I click the submit button.

I tried messing with php.ini settings and apache settings but they both don't seem to have any effect, I keep getting the same timeouts.

What can I do?

Thanks,
Jimmy

mbabuskov

6:50 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



Did you restart the server after changing php.ini?

There are 2 settings in php.ini for this; did you change both?

jimmy058910

7:01 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



The only php setting I see that has 30 seconds is the max_execution_time but I thought I read somewhere that this occurs AFTER the file is actually uploaded. What two settings are you referring to?

I restart Apache and MySQL when I try things.

mbabuskov

8:08 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



There is a setting named "max_input_time".

Maybe your php.ini is missing it and the default of 30 seconds is used?

[edited by: coopster at 4:53 pm (utc) on Apr 14, 2011]
[edit reason] TOS#13 [webmasterworld.com] [/edit]

jimmy058910

8:15 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



Yeah I seen that max_input_time but it defaults to 60 seconds so I figured that wasn't it and haven't tried messing with that one.

mbabuskov

8:29 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



Maybe the upload file size is limited and you it takes about 30secs. to upload that many bytes before it dies.

In any case, you should be able to see the error message in Apache log, unless logging is disabled.

HTH

[edited by: coopster at 4:53 pm (utc) on Apr 14, 2011]

jimmy058910

8:33 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



The upload size is 280M and post_size is 999M. Same settings from before that worked with a 211MB file before I moved to CloudFlare.

I'm going to try to turn on error logging and see what's going on

jimmy058910

9:00 pm on Apr 13, 2011 (gmt 0)

10+ Year Member



It does seem to be a problem with Cloud Flare and there might not be a way around (at least in my situation)

Thanks for the help though

rocknbil

9:51 pm on Apr 13, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also do it per directory in an .htaccess file. This is likely a little safer as it restricts the increases to a localized area on your server.

php_value max_input_time 200
php_value upload_max_filesize "300M"

However with file sizes like that you might still have issues with the browser timing out.

Rn a phoinfo() to verify they take effect.

damonCF

12:09 am on Apr 21, 2011 (gmt 0)

10+ Year Member



Hi,

I actually work for CloudFlare and we've seen some timeout issues with large files (working on a fix for things like WordPress). Options that might work right now:

1. Temporarily deactivate CloudFlare by going to: settings->Deactivate in CloudFlare. Try the upload again in about 10-15 minutes after doing so (or try Development Mode by going to settings->CloudFlare settings->Development Mode->toggle on).

2. If you often have to upload large files, try to create a subdomain for uploads and then add it to CloudFlare as a subdomain we don't proxy (settings->DNS settings->Add subdomain->Make sure Cloud is gray).