Author Topic: temp folder full of .thumb  (Read 600 times)

Offline DoppelMoppel

  • Newbie
  • *
  • Posts: 3
  • Roundcube fan
temp folder full of .thumb
« on: May 22, 2020, 12:57:38 PM »
Hi,

I have thousands of .thumb files in the temp folder of roundcube 1.4.3.

My config.inc.php includes

Code: [Select]
$config['message_cache_ttl'] = '10d';
but I guess I need another setting that's not default in order to delete the .thumbs automatically?

Thanks!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,472
Re: temp folder full of .thumb
« Reply #1 on: May 24, 2020, 04:34:16 AM »
That config option is for the message cache so it would not have any effect on temp files. I've never noticed Roundcube creating a .thumb file though and I don't immediately see anywhere in the code that's doing it. Could these files be coming from a plugin?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline DoppelMoppel

  • Newbie
  • *
  • Posts: 3
  • Roundcube fan
Re: temp folder full of .thumb
« Reply #2 on: May 24, 2020, 06:07:18 AM »
Hm, not sure.

Code: [Select]
$config['plugins'] = array('managesieve', 'carddav', 'password');
The activated plugins don't really read as if they might need any "thumbs". These thumbs are jpegs...

By the way, the old ones from 2016 are .thumb. The new ones are called RCMTEMPthumb*

Edit: The tumbs do contain thumbnails of attachments to mails. And they appear(1) to be created upon login.

Edit again: From the docs https://docs.roundcube.net/doc/help/1.0/en_US/mail/reading.html:

Quote
Image Previews

If enabled in the Preferences images attached to the message are listed as previews (aka “thumbnails”) right below the message text. Each image has links right next to it which let you either open the image in full size (Show) or Download it to your computer’s hard drive.

So... how to autodelete these...?
« Last Edit: May 24, 2020, 06:12:04 AM by DoppelMoppel »

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,472
Re: temp folder full of .thumb
« Reply #3 on: May 24, 2020, 07:27:17 AM »
ah ok. that makes more sense. deleting those files is handled by PHP's session garbage collection. There is also the config option temp_dir_ttl in roundcube to define how long temp files are kept. Is your server running Debian? I believe Debian has PHP's garbage collector disabled. See session.gc_* options in php.ini. You can also run <roundcube root>/bin/gc.sh script using cron to trigger the garbage collection periodically.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline DoppelMoppel

  • Newbie
  • *
  • Posts: 3
  • Roundcube fan
Re: temp folder full of .thumb
« Reply #4 on: May 24, 2020, 09:21:22 AM »
Yes, it's on Debian, and php session garbage collection is implemented via /etc/cron.d/php.

I did run <roundcube>/bin/gc.sh manually, I then entered

Code: [Select]
$config['temp_dir_ttl'] = '48h';
also tried rebooting the machine. At some point, I figured out that RCMTEMPthumb* apparently does get deleted (or did get deleted as a consequence of my attempts above). *.thumb doesn't get deleted (also didn't in my above efforts), but they apparently had stopped being created when I updated to 1.4.3. I've now manually deleted the *.thumb files and will see what happens.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,472
Re: temp folder full of .thumb
« Reply #5 on: May 24, 2020, 09:51:48 AM »
make sure you add <roundcube root>/bin/gc.sh to your cron.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…