Large File download

  • Posts: 29
  • Thank you received: 0
12 years 10 months ago #34338

Well I am not sure if this question should be sent to you or godaddy but here it goes. I have a file that is 1.1GB in size for download everytime a user begins downloading the file the connection breaks randomly at any point could be 3% or 30%. I called godaddy and they said they do not throttle connections. So I ran a couple of searches and came accross this site that seems to have found the answer but I am not sure if it applies to HIKA Shop, Joomla or Godaddy (below is the link). They refer to Response.WriteFile and Response.TransmitFile() any help would be greatly appreciated thank you.

forums.asp.net/p/1564247/3889889.aspx
forums.asp.net/t/1275581.aspx

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
12 years 10 months ago #34344

Here is some more info. I saved the file in a new folder and made a direct link to it from a joomla webpage and I could download the whole file. If I try to download it from HikaShop it fails to finish downloading even when using a downloading program like dap.

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
12 years 10 months ago #34367

These links are solutions for ASP applications on microsoft IIS servers.
HikaShop is coded in PHP and you probably use it on a Linux/Apache server so that's not related.
HikaShop can handle big files. We already have other users using the download function with files bigger than 1GB so I woudl indeed lean towards something on godaddy's end restricting the resources of your hosting (for example because the page processing takes too long and in that case you should increase the max_execution_time parameter of your php.ini ).

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
12 years 10 months ago #34418

Well I've spent all morning with godaddy and everything seems fine on their end. I can download the file from any location on my website but if its for sale in Hika shop it stops well before hitting 100%. I can give you guys access to the file both ways so you may see what I am referring to. My website is www.masterkaratetodd.com please let me know how you would like to proceed since at the moment it appears to either be an issue with HikaShop or possibly Joomla.

Just incase I am not being clear I thought I should fully explain what happens. If I purchase a downloadable video (1.1GB) from Hika shop the download process begins normally, it will then randomly stop and save the incomplete file where ever it stopped could be 59mb or 200mb. Obviously the file doesn't work since it didn't finish downloading. I have tried it with IE, Chrome and Firefox all with the same result. I have even tried using DAP (download accelerator plus) and had no success. Now if I remove the file from the hikashops "safe" folder, save it to any other folder in my directory and add a link to it on any of my joomla articles and download it I have no problems downloading the full 1.1GB in any web browser or with DAP. That is what lead Godaddy to say that they were a 100% sure it wasn't them. I still don't know that for sure but it seems logical.

P.S. your right I read over the link and it is IIS related and I am using a Linux server.

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
12 years 10 months ago #34419

When you download a file via HikaShop the file is sent to you via a PHP page process. That is needed so that HikaShop can check that the user has the right to download the file before sending it to him. If that PHP page process times out, the download will stop.
When you download a file via a direct link, PHP is not involved and Apache sends you the file directly.
In that second case, the limitations put in place by your hosting company on PHP page process do not come into play while on the first case, it is the case. Hosting companies always put such restrictions like memory limits and execution time limits.
Also, you say that the transfer starts and stop suddenly in the middle. There is no reason that HikaShop would stop in the middle unless PHP stops the page processing because of a PHP limitation put in place by your hosting company.
Finally, other users of HikaShop are already using it on other websites with big files like yours without problems.

All indicates that it comes from a hosting limit and more specifically, I would say that it's because of the max_execution_time parameter of the php.ini of your server which should be longer.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
12 years 10 months ago #34421

Ah I see thanks Nicolas I had not changed the max_execution_time parameter yet since I thought it was only controlling page load time I didn't think it also associated a file download with it as well. As usual you are fast to respond and make great points I will look into it and keep you posted thanks again.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 0
12 years 10 months ago #34505

I added the "max_execution_time = 3600" to my php5.ini in the root to see if it would work but it was a no go still trying it out with godaddy. Are their any shared hosting companies like Host Gator that you know work?

Last edit: 12 years 10 months ago by cyphergt.

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13346
  • MODERATOR
12 years 10 months ago #34523

The root directory is the correct place to put your php.ini file.

Some hosting companies block the modification of these parameters to avoid abuse.

We're using our own servers at ovh.com so we don't have such limitations since we can do pretty much what we want. I don't know much about such possibilities for shared hostings.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
11 years 5 months ago #104751

Hi Nicolas

I am having the same issue and understand what you are saying. What I want to find out is should the max_execution_time be long enough for the download to complete? So the download might take an hour depending on the internet connection of the client should my max_execution_time allow for that? Currently its set to 30 seconds??

Thanks

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 5 months ago #104787

Hi,

We can't know the exact current value of the execution time for your provide but if you have such download error, there is a value set.
At this moment, you can:
- see how have an infinite execution time with your provider
- use a dedicated server instead
- use a less secure download with HikaShop, the customer will be redirected to an url for the download. The positive point is that, no PHP will be use but the negative point is that the final URL could be seen by your users (so, less secure).
- use a custom hikashop plugin and a server module to generate dynamic secure download links. I use "mod_secdownload" with "lighttpd" web server but I don't know such good equivalent for apache2.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 0
11 years 5 months ago #104806

Hi Jerome

I have spoken to my hosting provider and as the domain is on a shared service 30 seconds is the maximum permanent allowed. Moving to a dedicated isn't an option for now so I have made use of the redirect option for large files.

Thank You

Please Log in or Create an account to join the conversation.

Time to create page: 0.098 seconds
Powered by Kunena Forum