Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Store running slow


Sierrab

Recommended Posts

I have a store selling MP3 and Flac files. As the size of the file to be downloaded increases in size, the time between clicking on the download hyperlink on the checkout success page and the browser download manager (Save as, or Open As Dialog box) appearing, grows in relation to the size of the file to be downloaded and with files over 13MB is so long it causes an Error 500.

 

I have set up a stand alone download.php as a test with no session info and the problem does not exist with this. From clicking a hyper link to the Save/Open dialog box appearing is a second or so

 

Something in my code is slowing the process down

 

Any ideas out there?

 

Steve

Link to comment
Share on other sites

you are probably on an overloaded shared vps server, which will bog down with files that size.

 

Hi Mibble,

 

I thought that originally but with my download testing file, there is no time lag.

 

For some reason the time delay between clicking on the link and the dialog box appearing only occurs within OSC, not with the stand alone file where I was able to download 40MB files straight off

 

In addition I have the same problem on my localhost set up (a duplicate site) although without the Error 500 appearing. It's the time delay between clicking on the hyperlink and the download manager appearing that is the mystery.

 

Steve

Link to comment
Share on other sites

A stand-alone file does not have to be passed through a temp folder before download. I suspect this is where the time lage is occuring. Re., the 500 error, this may occur because 13 Mb is exceeding the maximum file size allowed in php.ini, or else it's exceeding the php maximum execution time of 30 seconds.

 

Vger

Link to comment
Share on other sites

A stand-alone file does not have to be passed through a temp folder before download.  I suspect this is where the time lage is occuring.  Re., the 500 error, this may occur because 13 Mb is exceeding the maximum file size allowed in php.ini, or else it's exceeding the php maximum execution time of 30 seconds.

 

Vger

 

Hi Vger,

 

Does it have to go through a temp file? I have redirect set to False. In addition I get the same problem on my local host for a 5MB file the delay is about 8 secs whilst the a 15MB plus come in about 35 secs.

 

Also Mibble and others can download large files

 

I suspect I have a fault somewhere in my code that causes it to take so long to resolve the logic behind the link????

 

Steve

Link to comment
Share on other sites

is your download actually working? do you have download set to 755 and pub to 777?

and the files in the download directory?

i have download by redirect set to true, enable download set to true.

Link to comment
Share on other sites

is your download actually working?  do you have download set to 755 and pub to 777?

and the files in the download directory?

i have download by redirect set to true, enable download set to true.

 

Mibble,

 

Yes my download is working with MP3 files there is the time lag I mentioned but apart from that fine

 

It's the FLAC files that are the problem, they start around 15MB.... they share the same sub folders with the MP3 files, so I don't think the permisssions are an issue.

 

I did have it in test for redirect but I got so many errors I went back to direct download

 

I will give it another try and see if that's going to solve my problem, I have DC 5.3 installed with a modified Master Products. As the problem occurs on a local host set up mirroring the real site, I am convinced that it's down to a coding glitch that slows things down.......

 

Steve

Link to comment
Share on other sites

look thru your server log files, you can also turn on sql logging in the osCommerce admin area (make sure you turn it off after troubleshooting)

I will do some more local host "purchases" on test and check the sever logs after. I will also badger my ISP to send me a copy of the Web site tests I will do.

 

I still think I have acosing glitch!!

 

Steve

Link to comment
Share on other sites

I will do some more local host "purchases" on test and check the sever logs after. I will also badger my ISP to send me a copy of the Web site tests I will do.

 

I still think I have a coding glitch!!

 

Steve

 

Follow Up

 

Maybe the same glitch that causes IE's download manager to think that whatever track hyper link is selected that the name of that track is "download" and doesn't know its an MP3 file!! Firefox is fine and I recomend its use to all visitors!

 

Steve

Link to comment
Share on other sites

A stand-alone file does not have to be passed through a temp folder before download.  I suspect this is where the time lage is occuring.  Re., the 500 error, this may occur because 13 Mb is exceeding the maximum file size allowed in php.ini, or else it's exceeding the php maximum execution time of 30 seconds.

 

Vger

I have download.php set to download in chunks, so I don't think the size of the file should bother it.

 

Steve

Link to comment
Share on other sites

Results after following above suggestions

 

On LocalHost

 

Set to redirect led to immediate resolution of problem with large flac files. The Save As Dialog box appeared more or less instantaneously after clicking on the hyper link.

 

On the Web Site

 

On setting to redirect the site returned a 404 error saying the folder and file could not be found. This in spite of the fact that I could see the new named folder in the pub directory when I looked at the site via my FTP programme. I tried with different folder permissions 755 and 777...still no joy!

 

I reset the downloads to direct and the 500 error reappeared when trying to download large flac files

 

"There was an error in the script http://www.peebeestore.com/catalog/download.php or the script was not found.".

 

Steve

Link to comment
Share on other sites

Follow Up Thoughts.

 

The major difference between the local host which now works as it should with the redirect on, and the live site is the fact that there is SSL on the live site.

 

Could this be the cause of problem?

 

Although in the download testing file thee was no difference between the 2.

 

Steve

Link to comment
Share on other sites

A stand-alone file does not have to be passed through a temp folder before download.  I suspect this is where the time lage is occuring.  Re., the 500 error, this may occur because 13 Mb is exceeding the maximum file size allowed in php.ini, or else it's exceeding the php maximum execution time of 30 seconds.

 

Vger

Vger,

 

Does the above hold true for redirect? I came across the following post at Source Forge after a search on Google

Hi all.

 

this depends on your configuration, i.e. if you choose "Download per Redirect"

  you can forget all the comments about header and php.ini stuff, because PHP

just redirects to that file and then terminates.

 

I also saw some fixes there for my other problem with IE, has anyone used these?

Link to comment
Share on other sites

Having now spent a week or so trying to resolve the download issue and scanning the forums I still cannot figure out why when "Download by Redirect" is set to true I get a 404 even though I can see that the correct folders pages exist when I look at the site and that the permissions are set correctly.

 

Can it be anything to do with SSL?

 

Steve

Link to comment
Share on other sites

YES!!!!!!

 

A Solution

 

Download by redirect does not seem to like subfolders in the downloads directory on the web server (although it doesn't seem to have any problems with them on localhost??)

 

So with Downloads set to redirect and all the MP3 and FLAC files in the downloads folder, size is no longer an issue and I can download all the files.

 

Now all I have to do is figure out why IE thinks all the tracks are called download (no suffix) rather than name_of_song.mp3 and how to build in some logic that will prevent files being downloaded before the PayPal process returns verified

 

Steve

Link to comment
Share on other sites

Given that the last 10 posts are from yourself I'd say this is either the worlds most one-sided conversation - or else it's the worst case of 'bumping' I've seen.

 

Vger

 

Bump!!!!!! Moi!!

 

Never, how could you even suggest such a thing after I wrote you a thank you note. All the postings were valid and were posted in an effort to explain my problem and when it was solved I posted the solution so any poor buggers who were having the same problem could share my enlightenment

 

Shame on you!!!

 

Steve

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...