wrav / oembed

A simple plugin to extract media information from websites, like youtube videos, twitter statuses or blog articles.
MIT License
37 stars 36 forks source link

Large quantities of embed-cookies-{uid} are being created, but not deleted? #152

Open tim-digitalastronaut opened 5 months ago

tim-digitalastronaut commented 5 months ago

I've recently run into issues where no user sessions were being created on the server due to the fact that the /temp folder used up all available memory. After inspecting the contents of the folder, we noticed a huge quantity (0.5 mln) files names embed-cookie-{uid}.txt.

After reviewing the code for your plugin, and after taking a look at the \embed\src\Http\CurlDispatcher.php file's constructor, it would seem that this is the source of the issue. I'm assuming that these .txt files are being created in the temporary storage, but are never being deleted, or maybe only after a very long time?

For now we've cleared out the excess of files in our /temp folder. But obviously we'll encounter the same issue again in the foreseeable future.

Edit: I believe the issue is related to one of the dependencies (oscarotero/embed).

reganlawton commented 5 months ago

This would be something discussed with the core packages maintainers embed/embed as you noticed with your EDIT.

The issue itself can be maintained via a cron or such as well. The issue is if I start patching in very update the core package does it'll become a full time job. I only support this plugin and the others in the little free time I have, as I have moved from CraftCMS into a startup that I helped built.