News:

Dear jDownloads users, There is currently no Joomla 6 compatible version available. However, we are working on it and hope to release it shortly.

Main Menu
Support-Forum

Mysql issue where logs are not being removed when scanning for files

Started by fstltna, 16.11.2026 06:04:33

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fstltna

I have a issue where on my site (with 14k files) where if I scan to add new files using the admin area manually not by cronjob, it seems to have a memory leak where the drive space runs out. To get it back I need to do "PURGE BINARY LOGS BEFORE now();" 

Anyone else seen this? I am using the latest jdownloads (but I saw this on older versions too) Joomla 5.4.10 and php8.4...
https://msbob.org - Hub for the best Microsoft product ever
https://macos.retro-os.live - Hub for classic Macs - 14,000 downloads
https://amigacity.xyz - Portal for the Amiga - Over 9,221 free downloads!
https://beos.retro-os.live - Hub for fans of BeOS & Haiku operating systems
  •  

Arno

Hi,
the space freed by purging binary logs points to MySQL's binary logs rather than a PHP memory leak. These logs record database changes and are managed by the database server.

Could you please provide your MySQL/MariaDB version, binary-log format and retention settings, and how many new downloads/categories are added during an affected scan? Does the space also grow when no files have changed?

Please avoid repeating scans on an almost-full server. Your database administrator should also check whether the logs are needed for replication or point-in-time recovery before purging them.

These details will help us distinguish normal logging and retention issues from excessive writes during scanning.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •  

fstltna

My mysql version:
mysql  Ver 8.0.46-0ubuntu0.24.04.5 for Linux on x86_64 ((Ubuntu))

The files vary, but it is usually several hundred files out of 10,000 files where I see it. It doesn't seem to grow except when scanning new files, and it never occurs with just accessing the jdownloads tables day-to-day. If you tell me how to get that retention info you want I will look into it. Note I run maybe 100 servers and have seen this issue at one time or another on all of them.
https://msbob.org - Hub for the best Microsoft product ever
https://macos.retro-os.live - Hub for classic Macs - 14,000 downloads
https://amigacity.xyz - Portal for the Amiga - Over 9,221 free downloads!
https://beos.retro-os.live - Hub for fans of BeOS & Haiku operating systems
  •  

Arno

Hi,
thank you for the additional information. Importing new downloads causes database writes, so some binary-log growth is expected. We still need to establish how much they grow and how long they are retained.

Please run these read-only queries in phpMyAdmin's SQL tab or the MySQL console:

SELECT VERSION();

SHOW GLOBAL VARIABLES
WHERE Variable_name IN (
    'log_bin',
    'binlog_format',
    'binlog_row_image',
    'binlog_expire_logs_seconds',
    'binlog_expire_logs_auto_purge',
    'expire_logs_days',
    'max_binlog_size'
);

SHOW BINARY LOGS;

The first query confirms the database server version; `mysql --version` reports the client version. Some variables may not appear, depending on the server version.

Please send the results, removing any sensitive information. If `SHOW BINARY LOGS` returns a permissions error, please ask your database administrator to run it.

If sufficient disk space is available, also record the total binary-log size before and after one normal import, together with the number of downloads and categories actually created. Please do not repeat the test on an almost-full server.

Do not change retention settings or purge logs for this test. They may be required for replication or point-in-time recovery.
Best Regards / Gruß
Arno
Please make a Donation for jDownloads and/or write a review on the Joomla! Extensions directory!
  •