jDownloadsownloads.com


Author Topic: All logs disappeared after setting a limit in the System - jDownloads plugin  (Read 289 times)

0 Members and 1 Guest are viewing this topic.

Offline Zgrovetin

  • Newbie
  • *
  • Posts: 3
Hello,
I'm administering a site with a lot of downloads. There were more than 1 000 000 rows in the Logs, the oldest from 2018 year. As the info bar above says: "If you want to reduce the number of logged data sets, you can use the option in the jDownloads System Plugin ...", I set 500 000 in the empty "Maximum Download Log Data Sets" field. Hit Save and went back to Logs, expecting to see the last 500 000 downloading activity details. There were only 3 :/
I checked the db immediately, to find only 3 rows in (myprefix)_jdownloads_logs table.

Most recent db (and site) backup was taken on 21.03.2020 (9 days ago).

What is the possibility to recover the Logs ?

Joomla 3.9.16
jDownloads 3.2.66
PHP Version 7.3.8
mysql 5.6.45
live site hosted at goDaddy
cache deactivated

Offline ColinM

  • Moderator
  • *
  • Posts: 4.181
Hi
The default setting for number of logs is 3 - which is a bit on the low side.  Think that maybe the action was taken before you entered the 500000 value.  Also need to check the number format as writing five hundred thousand as 500 000 may have caused the problem.
Presume you are using the logs as part of applying user limits.  Is that correct?

Wew have had instances of jDownloads slowing down as the log files kept on growing - it is revised in the forthcoming jD3.9 to keep so many days worth as the principle use of the logs is when there are limits on number of Downloads.
Restoring the logs is a challenge unless you are very familiar with database stuff.
How did you take the database backup - was it with the jD tools or something like Akeeba?
Colin
 

Offline Zgrovetin

  • Newbie
  • *
  • Posts: 3
Hello Mr. ColinM and thanks for the quick reply.

Considering the timestamp of the 3 logs, they've probably were written after the previous were deleted (after the moment when Save was hit to apply the new plugin settings).
The number was put like 500000 and I've just checked to make sure it's still like this.
No users or user groups limits in downloading - nor by any means.

I've red the thread about the large number of logs slowing the site or at least the component, but I can't confirm it in my case and this recent experience.
The backup was taken manually: phpMyAdmin->Export all tables from db (method: Quick, format: SQL).

I'm planning to restore the db backup on a new created db - Y, than copy some rows from the Y.jdownloads_logs to the live db X.jdownloads_logs
Even than, there will still be a 9 days gap in the logs.

Regards,

Kristijan

Offline ColinM

  • Moderator
  • *
  • Posts: 4.181
Kristijan,
You obviously know what you are doing so looks like you will be able to recover.
If you are not using Limits is it just for statistical puposes that you need the logs?Best wishesColin

Offline Zgrovetin

  • Newbie
  • *
  • Posts: 3
Hey Mr. ColinM,
yes - it's just those 9 days missing in the Logs now, as assumed.

I guess the website owner is using it for statistics only.

Actually, the initial task was to purge most of the older logs and setting up an auto-purge with start/end date parameters. Have you planned developing such a function in some of the future releases, by chance?

p.s. As I'm still not quite sure what happened to the _jDownloads_logs table, I might simulate the situation of filling "Maximum Download Log
Data Sets" parameter field with a value and report the results here or in p.m.

Greetings,
Kristijan

Offline Arno

  • Administrator
  • ***
  • Posts: 12.622
    • jDownloads.com
Hi Kristijan,
Quote
I set 500 000 in the empty "Maximum Download Log Data Sets" field
when you typed it in this format the result would be 500 then all values behind a space are not valid.
I have tested it and the result can never be 3. So maybe was something not correct with the table?

By the way, to hold a million data sets only for statistical reasons is not recommended. And yes, it can the jDownloads part from the website make much slower.  In the new version 3.9 (beta) we have change the functionality for the "Maximum Download Log Data Sets". So will here futurely the 'amount of days' stored which the data exist in the table. See pic for example. We hope we can publish the 3.9 release candidate soon.

I hope that Colin could help you to restore the data.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!