jDownloadsownloads.com


Author Topic: Downloads Taking A Long Time  (Read 998 times)

0 Members and 2 Guests are viewing this topic.

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Downloads Taking A Long Time
« on: 02.11.2018 22:40:43 »
Our pdf downloads are taking a long time.  Sometimes 45 seconds or more.  And sometimes we get an error that says "too many redirects"

Currently using Joomla 3.9 and JDownloads 3.2.63 

I've tried the following:

- Disabling every Extension I can except JDownloads
- Disabling all possible plugins
- Disabling all possible modules
- Checking htaccess file and replacing with default version
- Running site on 3 different servers (all same result)
- Running site on localhost using WAMP (same result)
- Put a pdf on the server, without using JDownloads, and then tried downloading that separate pdf.  All was fine!

So I'm stumped.

Can anyone offer advice?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.704
Re: Downloads Taking A Long Time
« Reply #1 on: 04.11.2018 16:06:15 »
Hi
You have done a lot of testing in different situations!  Will try to help.
 
 What setting do you have in Config - Security tab - Protect your Download-directory?
 
 Do you have any trouble in uploading?
 Colin

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #2 on: 04.11.2018 18:13:40 »
Hi Colin.  Thank you for any assistance you can provide.

In regard to your question, "Protect your Download-directory?" is set to Yes.

We aren't having any trouble uploading pdf's.

Offline ColinM

  • Moderator
  • *
  • Posts: 3.704
Re: Downloads Taking A Long Time
« Reply #3 on: 05.11.2018 15:12:09 »
Hi
Could you try the effect of setting the "Protect your Download-directory?" to No.  Just trying to eliminate possibilities!!
ColinEDIT  Forgot to ask what browser are you using?
« Last Edit: 05.11.2018 15:16:15 by ColinM »

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #4 on: 05.11.2018 16:52:02 »
I tried that earlier, but tried again.

No change.

I'm using Chrome. 

I also tested with Mozilla.  Same result.

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #5 on: 05.11.2018 21:22:59 »
If it would help I can give you access to our staging server.  Just let me know how best to securely send you the info.

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #6 on: 05.11.2018 22:13:19 »
Here's my WAMP php error log after trying to download a pdf:

[05-Nov-2018 21:08:35 UTC] PHP Notice:  Undefined variable: user_random_id in C:\Documents\www\mysite\live\components\com_jdownloads\helpers\jdownloadshelper.php on line 3473

[05-Nov-2018 21:08:35 UTC] PHP Stack trace:

[05-Nov-2018 21:08:35 UTC] PHP   1. {main}() C:\Documents\www\mysite\live\index.php:0

[05-Nov-2018 21:08:35 UTC] PHP   2. Joomla\CMS\Application\CMSApplication->execute() C:\Documents\www\mysite\live\index.php:49

[05-Nov-2018 21:08:35 UTC] PHP   3. Joomla\CMS\Application\SiteApplication->doExecute() C:\Documents\www\mysite\live\libraries\src\Application\CMSApplication.php:195

[05-Nov-2018 21:08:35 UTC] PHP   4. Joomla\CMS\Application\SiteApplication->dispatch() C:\Documents\www\mysite\live\libraries\src\Application\SiteApplication.php:233

[05-Nov-2018 21:08:35 UTC] PHP   5. Joomla\CMS\Component\ComponentHelper::renderComponent() C:\Documents\www\mysite\live\libraries\src\Application\SiteApplication.php:194

[05-Nov-2018 21:08:35 UTC] PHP   6. Joomla\CMS\Component\ComponentHelper::executeComponent() C:\Documents\www\mysite\live\libraries\src\Component\ComponentHelper.php:357

[05-Nov-2018 21:08:35 UTC] PHP   7. require_once() C:\Documents\www\mysite\live\libraries\src\Component\ComponentHelper.php:382

[05-Nov-2018 21:08:35 UTC] PHP   8. Joomla\CMS\MVC\Controller\BaseController->execute() C:\Documents\www\mysite\live\components\com_jdownloads\jdownloads.php:34

[05-Nov-2018 21:08:35 UTC] PHP   9. jdownloadsControllerDownload->send() C:\Documents\www\mysite\live\libraries\src\MVC\Controller\BaseController.php:710

[05-Nov-2018 21:08:35 UTC] PHP  10. JDHelper::checkDirectDownloadLimits() C:\Documents\www\mysite\live\components\com_jdownloads\controllers\download.php:473
Edit by admin
« Last Edit: 06.11.2018 11:10:06 by Arno »

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #7 on: 06.11.2018 11:56:33 »
Hi,
could I get a link to the problem via PM?

Can you download other file types faster? Have you tried it with another file type but (nearly) the same file size?
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #8 on: 06.11.2018 17:54:31 »
Any file delivered through JDownloads takes a long time.

I did try completely deleting JDownloads and then doing a fresh install.

That does seem to solve the issue, though it would be a big undertaking to restore all our content.

When I did the fresh install, I tested by creating a nav menu item to a JDownloads category page.  Then did the download from there.

On the actual site the download links are generated by a bit of embed code in { }'s.

Could it be the way the links are created with the { }'s?

Offline ColinM

  • Moderator
  • *
  • Posts: 3.704
Re: Downloads Taking A Long Time
« Reply #9 on: 07.11.2018 09:52:37 »
Hi
Do you have a menu item List All Categories?  If not could you add one and try again please - later you could put it in a hidden menu.

If you uninstall jD then you can retain the database and the files.  This will be recognised when you re-install.
Also have you changed the jD root directory?
When you say the Downloads are in { }  do you mean they are in articles and you have used the jD Content Plugin?
Colin


Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #10 on: 07.11.2018 18:31:54 »
Thank you for your continued help Colin.

I just created a List All Categories menu item in my main nav menu.  I then tried downloading a file via that menu.  Same issue. 

I tried uninstalling JD and keeping the database and files intact.  I then did a reinstall of JD.  Same issue remains.

It seems the issue is only resolved by a complete uninstall of JD and then a fresh reinstall. 

I'm not sure if the jd root directory was changed.  I didn't do the initial set up.

The brackets I'm referencing are in Articles and create links to downloads.  I have attached a screenshot of the html.  However, I don't believe that's the problem.

FYI I did PM Arno.  Haven't heard back yet.

Offline ColinM

  • Moderator
  • *
  • Posts: 3.704
Re: Downloads Taking A Long Time
« Reply #11 on: 07.11.2018 21:46:23 »
Hi
Thanks for pics. Yes they are regular jD Content Plugin usage so all ok.Not too hopeful of my next suggestion but could you change the layout one to refer to onf of the standard layouts such as{jd_file onlinelayout==Files link only V3.2}
I am sure Arno will look very soon  - but maybe he did not get it!  Could you PM something to me please just to check

Interesting that just reloading the jD code made no change, but a complete reinstall did!! This sounds to me that the database has got itself into a 'knot'.  Sugest in Backend you goto Extenssions - Manage - Database and check Make a Backup first
How many Categories and Downloads do you have?Colin

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #12 on: 07.11.2018 22:20:41 »
I tried your suggestion without success.

I did try "fixing" the database earlier.  Again no change.

632 downloads in 184 Categories.

Offline ColinM

  • Moderator
  • *
  • Posts: 3.704
Re: Downloads Taking A Long Time
« Reply #13 on: 08.11.2018 13:53:11 »
Hi
Having your staging site frontend address I tried some downloads.

The biggest one was the 8 MByte Catalogue, that is 64Mb (bits).  The current speed of my internet connection is a bit low today at 9.9mbps, that is just unde 10 mega bits per second.  So the theoretical download time is approx 64 seconds. I measured the actual time at on my analogue watch at 66 seconds.  So it was not slow  - by the way I am in the UK.  There was a certain startup time where the screen was blank and that cetainly created the impression of being slow.

Note that many people think Mbps is referring to bytes but that is MBps with capital B for Bytes.
So on that test I did not find the speed actually slow!!

However I tried a small on that took 47secs in a pdf file with just over 1.3Mbits and that took 47secs which is slow!! Also retested my internet spped at just over 12Mbps.  So that was slow.
It seems to me that it is the initial communication/setup time that is the 'challenge'.
Will look more.  This might be the way your staging site is setup on a multi site server.

Colin
 

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #14 on: 08.11.2018 17:30:31 »
Thank you Colin.

I ran a speed test on my end too.  My download speed is 95.14 Mbps, so plenty fast.

See attached screenshot.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #15 on: 09.11.2018 10:41:40 »
I did PM Arno.  Haven't heard back yet.
Hi,
please escuse me for the delay but I was very busy in the last days.  :-\

When I remember me correct we had in the last ten years maybe three or four users with a similar problem. Not sure that it was all the time only pdf files. But possible. I think it was almost always not properly configured server settings. But I can not remember exactly.

But if you offer only publicly available documents, you could solve the problem for the moment:
- go to the configuration and deactivate in the TAB Downloads the option Send Downloads using the PHP Script?
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #16 on: 09.11.2018 18:01:47 »
I did try that Arno.  No change.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #17 on: 09.11.2018 18:30:15 »
I did try that Arno.  No change.
This proves for me that it has nothing to do with the jDownloads component. Please contact your hoster.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #18 on: 09.11.2018 18:32:10 »
I'm not sure I agree Arno.

I've tried this on 3 different hosts, including running the site via WAMP locally.

Same problem.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #19 on: 09.11.2018 18:39:56 »
When you have deactivated the option above is the file directly send to the browser. This 'steers' then the  download process  and not more the jD script. It is the same as when you use a normal direct link to a file on your server to download it.

Many thousand administrators use jDownloads since many years and nobody else has reported a problem like yours in the last years. So how great is the chance that it is a bug in jD? For me not so big.
« Last Edit: 09.11.2018 18:45:00 by Arno »
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #20 on: 12.11.2018 17:48:37 »
Arno -

I tested using a pdf that I uploaded via FTP and then I manually created a link to that pdf.

That pdf downloaded just fine.

So I don't believe it's a server problem.

And I've tested this on 3 different servers and the JD issue persists on all servers.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #21 on: 13.11.2018 00:05:38 »
Arno -

I tested using a pdf that I uploaded via FTP and then I manually created a link to that pdf.

That pdf downloaded just fine.
But then has you the same situation as I noted here:
Quote
But if you offer only publicly available documents, you could solve the problem for the moment:
- go to the configuration and deactivate in the TAB Downloads the option Send Downloads using the PHP Script?
But this will you have tried with the result:
Quote
I did try that Arno.  No change.
But that can not be.

So I will now make tomorrow self a few tests with big pdf files on different servers by me.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #22 on: 26.11.2018 13:40:05 »
Hi,
many thanks for the backup file.I could it now restore succesful (on PHP 5.8 ) and have the same problems as you.
But I need more time to find out the reason as it seems to be very tricky. I think still it is not a jD problem.  ::)
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #23 on: 30.11.2018 18:05:23 »
Hi Arno.  Have you made any progress?

Offline dlcinsd

  • Newbie
  • *
  • Posts: 14
Re: Downloads Taking A Long Time
« Reply #24 on: 12.12.2018 01:51:41 »
Please provide an update on this issue.

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #25 on: 12.12.2018 10:54:22 »
Hi,
please excuse me for the delay but I was ill some days.  :(
I work still on this problem and will try to post tomorrow my results here or via PM.
For me it is still not a jDownloads problem.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!

Offline Arno

  • Administrator
  • ***
  • Posts: 12.319
    • jDownloads.com
Re: Downloads Taking A Long Time
« Reply #26 on: Yesterday at 01:46:39 »
Hi dlcinsd,
I think I could localized the reason for your problem.  ::)

1. This Joomla installation seems not to be maintained really well.
2. It exists a lot of problems and it was not possible for me that it works with PHP 7.x.
3. After I had checked and tested a lot I took a look at the database. And here is the problem! In the jDownloads system plugin was never typed in a limit value for the maximum amounts of logs. So it exist here in the meantime more as a million data sets!!! When you now consider that by every download this table must be changed so It's no wonder that you see a longer break.

Please make this:
- open the jDownloads system plugin and type in a limit value for the logs. When you have assigned download limitations for user groups in jDownloads you should use a higher value (maybe 20,000 - 50,000). Otherwise should be a few thousand enough.
- save the plugin and wait now until the page is loaded complete again! In the background is removed a million data sets and that needs time (maybe a few minutes).
- try now again to download a file and check the result.

I think that your issue should solved now (I could not really test it here).

P.S. I will add a default limit value in the coming new version 3.9 to prevent this problem in the future. Thanks.
« Last Edit: Yesterday at 01:50:27 by Arno »
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!