[solved]File Downloading cuts/brakes prematurely

  • Posts: 31
  • Thank you received: 1
10 years 8 months ago #142902

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 2.5.18
-- PHP version -- : 5.4.24
-- Browser(s) name and version -- : any

I sell digital goods of about 800MB, 1.5GB, or 2GB (.mp4 movies)
The problem is that when a customer tries to download his paid file then the downloading process cuts randomly (or brakes) prematurely and always before it should. For example at 550MB out of 840MB ...so the movie won't play...
Of course, I already did the tests to download through direct HTTP link (http://website/file.mp4) and FTP (ftp://website/file.mp4) and there is no problem whatsoever.
The server is a quite capable dedicated machine with plenty of resources to store and serve big files but maybe this information helps: while uploading he needs the FTP client (Filezilla) to send "keep-alive" requests ...I'm not sure why but it works fine like this.

Any thoughts about the downloading problem? ...(it's a bit urgent :dry: )

Thanksss!!

Last edit: 10 years 8 months ago by onsitenet. Reason: solved

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
10 years 8 months ago #142903

Hi,

When you download though the secure system of HikaShop, it call a PHP page.
You have a PHP "max execution time" which should be, I guess, 30 seconds.
So after the 30 seconds, the download stopped because your server stop the PHP process.
HikaShop asked to the server to remove the php execution time but, if your server refuse it, we can't do anything more.

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: 31
  • Thank you received: 1
10 years 8 months ago #142919

Right next to the value of max_execution_time PHP Configuration Editor (cPanel) says: "This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30.

Is there any workaround? ...I could set this the value at any number ...just to see if it helps but it doesn't seem like the best idea.
Right now I'm rebuilding Apache+PHP changing some cache managers and other handlers. Am I the only one with such problems? :S

Also (as expected) this method of serving downloads doesn't support Download Managers and resuming(!), this would obviously be very helpful for the customers and for our peace of mind.

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

  • Posts: 31
  • Thank you received: 1
10 years 8 months ago #142924

EDIT: maybe the main problem is gone! ...I'l do more tests to be sure...

What I did, changed Apache to run PHP from fastcgi to mod_ruid2 [the magic of a DSO handler(?)]
That fixed another crazy thing, simultaneous downloads(!) :) ...only 1 download was supported before the fix (was throwing internal server errors) ...but no Download Managers or resuming :(

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

  • Posts: 26150
  • Thank you received: 4026
  • MODERATOR
10 years 8 months ago #142928

Hi,

The secure download system in HikaShop supports the resume feature.
It allows the HTTP command to seek in a download file, command which is used by download managers and for the resuming.

The max execution time is by default set to 30 but you have to allow HikaShop to change dynamically this variable.
At this moment, for the download, the max execution time will be changed and it will allow you to send large files though the secure download system.

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.
The following user(s) said Thank You: onsitenet

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

Time to create page: 0.060 seconds
Powered by Kunena Forum