cancel
Showing results for 
Search instead for 
Did you mean: 

Disk space issues related to Advanced Reporting cron after update from 2.2.3 to 2.2.6

SOLVED

Disk space issues related to Advanced Reporting cron after update from 2.2.3 to 2.2.6

Hello,

 

I'm experiencing a big weird issue. I have updated 3 days ago from Magento 2.2.3 to 2.2.6. Everything went just fine. But on the day after the update, I received a warning from server health monitor regarding a disk space issue. A file had been created on sever root, in /tmp/analytics folder:

~tmp-1537660818.7487tar.tar : 11G

3 days after that, I have 3 files in that folder:

~tmp-1537660818.7487tar.tar : 11G

~tmp-1537747210.659tar.tar : 6,5M

~tmp-1537833608.7409tar.tar : 2G

File owner is the website owner. When I open file with terminal, I get endless lines repetitions :

x order_addresses.csv
x ../: Path contains '..'
x .././: Path contains '..'
x ../././: Path contains '..'
x .././././: Path contains '..'
x ../././././: Path contains '..'
x .././././././: Path contains '..'
x ../././././././: Path contains '..'
x .././././././././: Path contains '..'
x ../././././././././: Path contains '..'
x .././././././././././: Path contains '..'
x ../././././././././././: Path contains '..'

Files seem to be created along with the database backup each night. But I can't find logic between database backup and csv files. I disabled database backup for the coming night to see if the problem remains.

I found 2 files mentionning order_addresses:

vendor/magento/module-sales-analytics/etc/analytics.xml

vendor/magento/module-sales-analytics/etc/reports.xml

 

Any idea on what could cause this issue ?

 

Disabling the database auto backup did not change my issue. Tonight a 6.5M file has been created. I will not delete this one as it's not a big problem of disk space and keep on checking this issue.

 

EDIT

Uncompressing the tar files with tar ztvf yourfile.tar.gz gives me other results:

-rw-rw-r--  0 domainuser psacln 100669 26 sep 02:00 order_addresses.csv
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 ../
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 .././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 ../././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 .././././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 ../././././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 .././././././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 ../././././././
drwxrwxr-x  0 domainuser psacln      0 26 sep 02:00 .././././././././

 

EDIT
I tried to open the file with 7zX, it loops endlessly. I also tried with an application called Décompresser (2.0.2), and it creates a folder with an error alert. The folder contains a order_addresses.csv file with 5 columns : entity_id, customer_id, city, region, country_id.
But I can't find what creates or tries to create, or at least tries to handle that file every night... Any idea ?

 

Again, only place I can find order_addresses mentionned is in vendor/magento/module-sales-analytics... Any idea ?

 

EDIT

module-sales-analytics seems to be used by Advanced Reporting module which on my side is very buggy from the start! It always leads me to a 404. I will try to reconfigure the module, or disable it.

 

EDIT

Reauthorizing Magento Analytics user did not change the thing, still got a 13G file this night. I just disabled Advanced Reporting module to see the change.

 

EDIT

Disabling Advanced Reporting module solved the issue, but it's not the best solution I think, more of a workaround. I tried to reach Advanced Reporting module devs but no answers.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Disk space issues related to Advanced Reporting cron after update from 2.2.3 to 2.2.6

I  checked this issue again, seems like I was not the only one facing this.

Problem seems to be fixed in this commit:

https://github.com/magento/magento2/commit/8e1a5d342cbc63f58529b6c25be41c7d9a979a66

 


Some code has to be changed:

$dirFiles = array_diff($dirFiles, ['..', '.']);

instead of

array_shift($dirFiles);
/* remove  './'*/
array_shift($dirFiles);
/* remove  '../'*/

around line 262 in lib/internal/Magento/Framework/Archive/Tar.php or vendor/magento/framework/Archive/Tar.php depending on the install.

The fix worked for me.

View solution in original post

1 REPLY 1

Re: Disk space issues related to Advanced Reporting cron after update from 2.2.3 to 2.2.6

I  checked this issue again, seems like I was not the only one facing this.

Problem seems to be fixed in this commit:

https://github.com/magento/magento2/commit/8e1a5d342cbc63f58529b6c25be41c7d9a979a66

 


Some code has to be changed:

$dirFiles = array_diff($dirFiles, ['..', '.']);

instead of

array_shift($dirFiles);
/* remove  './'*/
array_shift($dirFiles);
/* remove  '../'*/

around line 262 in lib/internal/Magento/Framework/Archive/Tar.php or vendor/magento/framework/Archive/Tar.php depending on the install.

The fix worked for me.