Closed samjoneill closed 1 year ago
Hi @samjoneill, sorry for the late reply.
Are you still running into this issue? I haven't had any other reports of memory usage issues. Similarly, I can't think of any reason why Ad Wizard might be maxing out the memory.
Feel free to ping me on Discord if you want some assistance troubleshooting this!
Hi @lindseydiloreto
I am a colleague of @samjoneill and took on the task to research this issue as it still persists and our client is unable to use the plugin. After a day of trying everything (and I am not kidding), we finally discovered what the problem is.
Just a bit of background first. We have been running Ad Wizard on this Craft multisite installation for a couple of years. Both websites receive healthy traffic, with one receiving very high volumes of traffic during one month the year (as it is for a festival). Obviously, the plugin did work but now it times-out when trying to access the Edit/Add ad page.
Locally, I stripped back the website removing all sections, fields, volumes, categories, globals and plugins. Essentially, back to its bare bones, however, the problem persisted. Therefore, we started looking at the data retained in the database tables and discovered the volumefolders had amassed a humongous 1.5 million rows. Apparently, a row is created for the temporary asset folder for each user session (although I am not sure what triggers this and why).
We have discovered a ticket relating to this issue on the Craft CMS repo: Almost 1.9 million temp user folder records in craft_volumefolders
I will reopen this ticket requesting that the same solution is back ported to Craft 3 as we are version locked due to legacy plugins. However, as this is a long shot and may take time for the P&T guys to do, I wondered if you could modify your plugin? Currently, the image field automatically displays all volumes. I’m guessing that this is why the page times-out as it is searching through the temp folder with 1.5 million records. Is it possible for you to exclude this folder when you do your look-up?
I am sure we are not the only ones who will experience this issue with a swelling volumefolders table, so I hope this makes sense to be added as a feature request for Ad Wizard.
Thanks in advance for your help.
Hi @simonleadbetter, sorry for the delayed response.
Reading through that related thread, it looks like you got everything worked out! Or more specifically, Brandon provided a MySQL query which does what you need.
I'm glad you were able to get to the bottom of the issue, it's nice to have that mystery resolved. Since the fix was handled within Craft's core, it sounds like no changes are required from Ad Wizard.
Thanks for the detailed update! 👍
Hi,
We have a client who is unable to edit any adverts due to memory limits being exceeded when trying to navigate from either the Stats or Ads pages into an entry. Locally, upping my memory limit for the site to 1024MB restored functionality, but that seems excessive and is potentially indicative of another issue. Our production server has a 256MB memory limit meaning we cannot restore functionality on the live site.
Would it be possible for you to investigate any potential cause of this memory issue?
Thanks.
Craft version: 3.7.37 Ad Wizard version: 3.1.4