Roundcube Community Forum

Release Support => Pending Issues => Topic started by: DoppelMoppel on May 22, 2020, 12:57:38 PM

Title: temp folder full of .thumb
Post by: DoppelMoppel 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!
Title: Re: temp folder full of .thumb
Post by: JohnDoh 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?
Title: Re: temp folder full of .thumb
Post by: DoppelMoppel 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 (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...?
Title: Re: temp folder full of .thumb
Post by: JohnDoh 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.
Title: Re: temp folder full of .thumb
Post by: DoppelMoppel 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.
Title: Re: temp folder full of .thumb
Post by: JohnDoh on May 24, 2020, 09:51:48 AM
make sure you add <roundcube root>/bin/gc.sh to your cron.