dotmailer / dotmailer-magento2-extension

The official Dotdigital for Magento2 extension
https://dotdigital.com/integrations/magento
MIT License
48 stars 64 forks source link

Files piling up in var/dotmailer/email #600

Closed bartoszkubicki closed 1 year ago

bartoszkubicki commented 1 year ago

I use extension in version 4.12 - it is bundled with magento 2.4.3-p3. To start with, I don't know this module well and there is no doc or readme for it. We struggle with disk space and I observe files piling up in var/dotmailer/email - almost 5 GB. Some of csv are quite old and come from 2020 year, judging by name pattern. There is archive catalog inside and there are a few files there - I have seen a cron job cleaning this catalog. However I don't see a catalog to clean up var/dotmailer/email. Is it safe then to just delete this catalog? I feel like these files can be leftover after failed exports or something like this.

sta1r commented 1 year ago

Hi there. Our contact syncs are supposed to put files in var/export/email (not var/dotmailer/email). Do you have recent files landing in var/dotmailer/email? If not, check they are in var/export/email. It may be you can delete the var/dotmailer directory.

Start here for docs:

bartoszkubicki commented 1 year ago

Is it possible that var/dotmailer catalog was used in older versions of extension?

sta1r commented 1 year ago

I looked at that possibility, but from what I can tell our Magento 2 connector has never used that path (it was export/email in Magento 1).

bartoszkubicki commented 1 year ago

Ok, I have found composer patch changing directory for dotmailer. Don't know the reason, but that is not the case here. Sorry for confusion. Why some files remain in var/export/email while we have archived dir? It is a result of any problem during export action? Should they be picked up again? I see file even from today. If I would go ahead and deleted all files, is dotmailer extension going to generate fresh files to be exported very next day? Or at least delete files older than year to date? There is a cron cleaning up archive directory and it is almost empty and contains file from 7th Feb (so cron works), but on the other hand we have thousands of files in var/export/email.

sta1r commented 1 year ago

If you have thousands of files in var/export/email that suggests a problem moving processed files into var/export/email/archive. It may mean that a sync has failed, but it may just be caused by a temporary permissions issue. If you are seeing the expected number of contacts in your Dotdigital account, then probably you don't have a sync issue. All processed csv files should be archived after the importer cron has finished (it runs every 5 minutes by default). But if this doesn't happen, they won't be picked up again.

Check the dates of your files in var/export/email. Anything older than 2 hours can safely be deleted (or moved into archive), presuming your customer / subscriber / guest syncs are running as normal.

I'm going to close this one out, but please contact our support team if you need further help / info! https://support.dotdigital.com/hc/en-gb