Announcement

#1 2022-01-13 04:00:15

fchar
Member
2021-09-10
6

File usage and strange folders

Hello,
I'm using Piwigo 12.2.0. I'm trying to solve some file usage issues from my cPanel, and 2 of my subdomains (Piwigo photo galleries) are using a large amount of files. Of course my pictures are the main source (under /upload), but inspecting some subdirectories, I found a couple of strange folders:
/_data/i/upload : didn't checked completely, but it seems this directory has a duplication of all my pictures.

I'm unsure if this has something to do with the 'Photo sizes' in Piwigo configuration. At this section, 'Square', 'Thumbnail' and 'Medium' are marked by default. I assume Medium is the base size of the picture to be displayed; Thumbnail is the small one displayed as a preview (so I can't touch any of these); and Square... seems redundant, so I deleted all Square pictures under Maintenance > Delete multiple size images. But the contents under /_data/i/upload are still there... what they are?

Something else:
/_data/combined : this has *lots* of .css files with strange names (e.g. 10grnp0.css) and one .js file (10ft3gt.js). I don't know if these really are Piwigo files or some malicious thing. The combined size of the 'combined' folder is about 14mb and I will be happy to delete those hundreds of .css files, but I prefer to ask first.
Thanks for any guidance on this!

Offline

 

#2 2022-01-13 10:41:22

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13789

Re: File usage and strange folders

Hi fchar,

No malicious files in what you describe.

* upload is where your uploaded photos go
* _data is for everything in cache, meaning you can delete its content and Piwigo will rebuild it when necessary
* _data/i is for multiple-size cache
* _data/combined is where Piwigo puts the combined javascript and CSS files.

Offline

 

#3 2022-01-13 20:18:04

fchar
Member
2021-09-10
6

Re: File usage and strange folders

Hi,
Thanks for your reply.
If all contents under _data is just cache and it's safe to remove them, I will do that.

Just one last question regarding this: My 1st gallery (3800+ photos) has a big amount of cache files (about 10000 .css+.js under "_data/combined"), and my 2nd one (100 photos) has 52 .css+.js there.
Is it possible to perform some automatic cache cleaning, limit the amount of cache files or is there any way to remove those caches within the Admin panel?
Also, I noticed that the cache files are from today's date, and were generated very frequently (please check this: https://i.imgur.com/xkuSdWK.png). I don't know if they are intended to be overwritten on a daily basis with such frequency.
I discovered this because my hosting warned me regarding an excessive amount of files in the server, so it would be helpful to know if it's necessary to do some auto or manual cleaning after X time to avoid problems, or if there is some way to adjust the amount/frequency of generation of those files.

Offline

 

#4 2022-01-13 22:34:57

erAck
Only trying to help
2015-09-06
2019

Re: File usage and strange folders

You can purge cache content in Admin -> Tools -> Maintenance, Purge Cache, Purge compiled templates and Delete multiple size images. If your files constraint is that low you also may want to restrict the image sizes generated, under Admin -> Configuration -> Options, tab Photo sizes, Multiple size. There's also a Show details link "hidden" on the right that may show additional Custom sizes generated that could be deleted there (usually only a few files though).

For periodically cleaning up if still needed best use a cron script that removes files older than a week or so.


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2022-01-15 03:05:16

fchar
Member
2021-09-10
6

Re: File usage and strange folders

Hi,
Thanks a lot for this information, I will follow these steps to optimize my file usage from now :)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact