632 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 more
UBLThemes says

Hi guys, most likely wont get a response on here but I have hit a snag on a development I am doing for my personal site.

I developed an uploading script to upload files which I have done a million times.

Everything works 100% apart from when I upload files above 20mb.

I know most will be thinking simply change the upload_max_filesize or post_max_size but this does not do it as this was the first thing I changed.

For instance I start uploading and it gets to about 50% and then it goes to a blank page which says Error code: ERR_CONNECTION_ABORTED.

I then changed the max_execution_time to 259200 so that it should never time out.

I even upped the memory limit to 500mb just incase and still I get this.

This works with files of around 16mb but as soon as I hit more it does as stated above.

Any idea what the issue could be?

Thanks :)

136 posts
  • Has sold $1,000+ on Envato Market
  • Has collected 100+ items on Envato Market
  • Joined an Envato Football competition
  • Has been part of the Envato Community for over 5 years
+2 more
Konnessa says

Hi there,

Are you using Apache or Nginx for your web-server?

If you are using nginx, you may need to add

client_max_body_size 40M;

To your server {} block – where 40M is the maximum body size that you want to be able to be uploaded.

632 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 more
UBLThemes says

Im using Apache, Ive already tried that.

Ive just been told to look at:

MaxRequestLen
FcgidMaxRequestLen

My plesk recently update and what ive read on the internet the latest plesk sets a limit on these values which in most cases throttles large file uploads.

Ive never worked with these so now I need to search for where they sit on the server :(

Anyone can point me in the right direction?

632 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 more
UBLThemes says

Ok after 2 days of tinkering and searching on the internet I finally found a solution to this.

I am going to write it on here incase any author or basically anyone searching on google etc has the same issue they will be able to correct this.

Basically the issue is that within plesk 10+ it sets a chock on files above 15mb which basically means that even it you increase your file upload size etc etc within the php.ini it does not work.

Why they have done this I dont know, I am assuming its a security thing.

Anyway the work around is simple find the domainVirtualHost.php which is located within this root:

/usr/local/psa/admin/conf/templates/default/domain/

Copy the file and then create a new folder called custom within this root area:

/usr/local/psa/admin/conf/templates/

Then within the custom folder create a new folder and call it domain so now your root access should look like this:

/usr/local/psa/admin/conf/templates/custom/domain/

insert your copied file within there and then open it and change the FcgidMaxRequestLen digits to a more suitable number.

Then you will need to reconfigure your domain using the following code within ssh:

/usr/local/psa/admin/bin/httpdmng—reconfigure-all

Then restart the psa and the apache.

Hope this will help people in the future :)

by
by
by
by
by
by