Help Desk

Large number of Transients in wp_options table

  • Posts: 11 Topics: 6
    | Permalink

    Hello,

    Since launching the our site it has (along with other sites in our WP multinetwork) have been gradually seeing a decrease in performance. On Thursday Nov 24th we deleted about 143,513 rows of transient entries bringing the wp_options table from 8Gb to 200mb.

    Over the weekend 2,800 have been created. It seems like these transients do not have an expiration date assigned to them and are being generated from the plugin. We continue to monitor the growth but it is like trying to bail water out of a sinking ship.

    Any help on the matter would be greatly appreciated.

    Thanks

    Posts: 11242
    | Permalink

    Wow, that’s a lot of transients.

    Often when transients get expired, they stay in the database. If you want to clean up your wp_options table, then you can use this plugin called Delete Expired Transients (third-party, not guaranteed or supported by us).

    Please let me know if you have any follow-up questions on this topic.

    Posts: 11 Topics: 6
    | Permalink

    Thanks Cliff, but through your experience with the product is this normal? Could there be some sort of conflict or bug that is allowing this to happen. From my understanding of transients if they are set to expire they should not remain in the DB.

    Thanks

    Posts: 11242
    | Permalink

    If that plugin works the way it says it should, I think that’d solve your problem.

    However, yes, I think they should be deleted by default, since https://codex.wordpress.org/Transients_API states they should get deleted after they expire.

    Since the deletion of expired transients is outside the scope of our plugin’s functionality and we haven’t heard of this issue from others, I’d suggest following these recommended troubleshooting steps for your own site:

    Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    If it is, please follow our Testing for Conflicts Guide (basically switch to Twenty Sixteen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.

    If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG and share any debug messages you see while changing tickets quantity, navigating your site’s home page, events page, single-event pages, and any other of your site’s pages relevant to this ticket.

    Then, please share your System Information (while in Testing for Conflicts Mode). That will give me a lot of extra information to help diagnose the problem.

    You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)

    Let us know what you find out.

    Thanks.

    Posts: 4 Topics: 1
    | Permalink

    Hello, guys!
    I had same problem.
    In wp_options was about 7000 rows (1,5 Gb).
    I used plugin Delete Expired Transients
    At the moment 672 rows (2,6 Mb).

    Posts: 11242
    | Permalink

    Hi, Steve.

    Thanks to libo and a couple other users reporting this same issue, I’ll mark this ticket as Pending Fix, which means this thread should receive a reply once the applicable fix has been released. I cannot guarantee when it will be fixed as it’s in the development team’s hands now. They need to assign it, code it, test it, and schedule it for release.

    I apologize for this issue and appreciate your understanding and patience.

    The current workaround is to use a plugin like http://wordpress.org/plugins/delete-expired-transients/ (third-party, not guaranteed or supported by us)

    Posts: 11242
    | Permalink

    @steve and/or @libo,

    Do you have any information about the option_name of the meta that is filling up the wp_options table?

    Having this information will help our developers try to figure out this issue.

    Thank you.

    Posts: 6240 Topics: 17
    | Permalink

    Hi There!

    First, we wanted to apologize for the long delay in getting back to this topic in regards to the issue reported here.

    We just wanted to share with you an update for the issue reported here.

    We’ve reached to the conclusion that the lack of decent garbage collection (for transients stored in the database) is a general shortcoming that is best addressed from the WordPress core side of things.

    We know some other plugins face with the same issue. The good thing is there are several great tools out there, such as the WP Transients Manager, that can solve this problem.

    As a result, we don’t wish to duplicate efforts by baking in our own transient garbage collector if solid general purpose tools (like WP Transients Manager) already exist to do the same job.

    As always, if you decide to implement one of these tools, we suggest to setup a dev/staging site so you can test things out without disrupting the live site.

    Don’t hesitate to reach out to us for any follow up questions you may have.

    Best,
    Victor

    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink