jDownloadsownloads.com


Support-Forum

jDownloads for Joomla 3.x => jDownloads 3.2 => General => Topic started by: dlcinsd on 02.11.2018 22:40:43

Title: Downloads Taking A Long Time
Post by: dlcinsd 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?
Title: Re: Downloads Taking A Long Time
Post by: ColinM 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
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: ColinM 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?
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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
Title: Re: Downloads Taking A Long Time
Post by: Arno 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?
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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?
Title: Re: Downloads Taking A Long Time
Post by: ColinM 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

Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: ColinM 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
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: ColinM 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
 
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: Arno 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?
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd on 09.11.2018 18:01:47
I did try that Arno.  No change.
Title: Re: Downloads Taking A Long Time
Post by: Arno 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.
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: Arno 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.
Title: Re: Downloads Taking A Long Time
Post by: dlcinsd 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.
Title: Re: Downloads Taking A Long Time
Post by: Arno 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.