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

jDownloads 4.x Random File Permission Corruption After Concurrent Multi-Category Cron Sync with Exte

Started by max1987martin, Today at 14:32:18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

max1987martin

Hello everyone,

I am facing a very strange issue with jDownloads 4.x on Joomla 5 after implementing an automated synchronization system for external download repositories.

Environment setup:

Joomla 5.2.x
PHP 8.3
MariaDB 11
jDownloads 4.1 beta
Redis object cache enabled
Nginx reverse proxy
External storage mounted via NFS
Around 48,000 downloadable files
Multi-category inheritance with custom user group permissions

Problem details:

I created a cron-based synchronization script which automatically scans external mounted directories every 15 minutes and updates jDownloads entries through the database and plugin events.

The issue only appears when:

Multiple users download files during synchronization
Cache preloading is enabled
Files belong to nested categories with inherited permissions
Download method is set to "PHP Script"
Simultaneous frontend uploads occur

Symptoms:

Random files become inaccessible for specific user groups
Download counters duplicate inconsistently
Some file IDs return 404 while database entries still exist
Occasionally category permissions reset partially
Rarely, the same file appears duplicated with different checksum values
Logs show no SQL errors
Redis cache purge changes behavior temporarily
Issue disappears if direct download mode is enabled instead of PHP Script mode

Additional strange behavior:

When OPCache is disabled, the problem frequency decreases significantly, but frontend category rendering becomes slower.

I already tested:

Rebuilding categories
Repairing assets table
Reinstalling jDownloads
Disabling all third-party plugins
Switching from NFS to local SSD storage
Different PHP memory and execution limits
Manual database optimization
Joomla debug mode

Nothing fully fixes the issue.

Has anyone experienced race-condition-like behavior inside jDownloads during concurrent download + sync operations with external mounted storage systems?

I suspect there may be a locking issue between category asset inheritance, cache invalidation, and file permission evaluation during simultaneous cron execution.

Any ideas where to investigate next?
  •