Posted: November 10, 2017 at 5:55 am
We have been seeing a high load on our server and find the wp_options table involved in a slow query in the mysql log… https://gist.github.com/lorenzocaum/e10ba04bc411428f6db54dcbccb6f9a4 Then I find almst 780K records in that table starting with ‘_transient_timeout_ee_ssn_’. Should these be expirting? I’ve found posts on the WordPress forums regarding _transient_ records and it appears all are safe to delete? |
|
I have now updated to 4.9.50.p from 4.9.46.p. |
|
You might find that those will be deleted now that the site is on 4.9.50.p. If they’re still in the database they’re safe to delete. |
|
Thanks, for our records, this was done:
|
|
Also, it was necessary to delete others:
And it does not seem to stop, is that normal for there to be a limited amount of these records present? |
|
There’s likely a query limit being enforced. Another approach you could take is install this plugin: https://wordpress.org/plugins/transients-manager/ Then you go to the Tools > Transients manager page and click the Delete Expired Transients button. |
|
One other related option that will be good to check is the |
|
Still suffering high loads and CPU usage by MariaDB. I’ve used the Transient Manager to reduce transients down to ~2500 and see lots of these entries in the web server error log: https://gist.github.com/lorenzocaum/b2ea1b0e23fce634285c2088eeb09022 |
|
The ee_transient_schedule option is set to 1 and load average has reduced from ~20 to 7-15 range now that expired transients were removed. I already have 100 more transients in the table a couple of minutes after deletion. |
|
Still having the issue of records growing in the wp_options table even though we are now running Version 4.9.50.p. Now grown from ~2500 to over 8000 since last purge of expired items 2 1/2 hours ago. |
|
That is over 8000 records of just _transient_timeout_ee_ssn_ transient records. |
|
Also, what is the ee_transient_schedule entry in wp_options? Is that related to the web server error above? Here is a list of the autoload records by size and it is the largest by far. https://gist.github.com/lorenzocaum/36c5b53278d326aad294ef1bc128b9e2 |
|
Since this has the name transient in it and there were over 1 million columns in the value, I thought it best to delete and did. Immediately restoring the server to a normalized load. Has this issue been addressed? |
|
This does not seem to be resolved in the latest version. The ee_transient_schedule option value is already back up to over 80K columns and the number of _transient_timeout_ee_ssn* records keep growing quickly after purging expired transient records. |
|
Woke this morning to server alerts about high load again. Found ee_transient_schedule option value with over 700K characters. As soon as I delete, load normalized. |
|
|
We are having the same issue PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND The below queries are causing the issue: Id User Host db Command Time State Info |
This issue is causing our wp_options.ibd file to grow rapidly, it is now 35GB as I keep manually deleting transient records from the database. Once this is resolved, I’ll need to run OPTIMIZE TABLE and I’m afraid it will take long and require us to take the website offline to avoid database locks since this is the highly active wp_options table. But we must get this resolved first to keep it from growing again, any ideas how to resolve? |
|
This is a critical problem for our production website, the index file continue to eat all our free disk space as transients records continue to grow by the thousands. Please respond with a solution ASAP! |
|
Hi there, My apologies for the delay, support staff aren’t usually available on the weekends which is why you haven’t had a reply so far. I’ve created a ticket for some further feedback from our developers on this, but at the rate in which your site is creating transients (~2200 per hour) it sounds like your site is being hit by at least one bot. Do you have any security plugins enabled on the site? You could try adding the Blackhole for Bad Bots plugin (note there is a little more to installing that plugin that just installing it, check the installation tab from above) and see if that helps at all, or check your server access logs and see if you’re being excessively hit by the same bot(s) which you can then block server side by IP. |
|
I’ve already viewed our server access log and watching our Apache web server server-status page all weekend. Nothing excessive with only 25-50% of the connections active at one time. Relatively low load over the weekend as usual. The access_log actually pauses between hits. |
|
I will tell you once the ee_transient_schedule option reaches 1 million characters, error being to appear as noted previously and load causes server to become unresponsive. Also, on the MariaDB, while I intentionally request wp-admin, the only processes on the db are… https://gist.github.com/lorenzocaum/2b8ffa67fe79f26291d607adce135604 |
|
My apologies and maybe I’m misunderstanding, but I’m not sure what the above has to do with bots hitting the sites and causing the transients to be saved? If all/most of the connections mentioned are bots hitting the Event Espresso ticket selector and submitting the form a transient will be created for each one, if that’s repeatedly happening on your server the transients will be created quicker than they are removed. So have you checked the access logs to confirm the same IPs are not constantly hitting the site? |
|
Yes I have check the access log and actively watching it, this is how I know it actually pauses between some hits. If I bot was hitting the site that many times, from my experience, the log would be spitting out the same IP constantly. The current Apache stats page shows this below. I don’t see any requests for EE pages, but we are still adding records to the wp_options table as described above. Luckily it seems the index file stopped growing at 39GB a few hours ago, however, high server loads will again occur when the ee_transient_schedule gets above 500K characters. I am actively deleting each hour. https://gist.github.com/lorenzocaum/517a489391fd0186d16a635653419ce7 |
|
I mentioned this before, but it bears repeating: You can empty the |
|
Really see no activity on our server to suggest a bot, but okay. Can you tell me when the ee_transient_schedule option clears on its own? It appears to grow until I clear and causes issues once it reaches several 100K characters. It’s still increasing 1K per minute or more and Apache or direct monitoring of the access logs shows no major activity. |
|
You can check the ee_ssn_ transient values themselves, each one will have a user agent. Garbage collection should run every hour, but you can tweak the rate and limit by adding the following to a custom functions plugin:
|
|
Installed Blackhole plugin yesterday, woke again this morning to alerts by our monitoring system of heavy load and found over 450K characters in the ee_transient_schedule value, 9500K records for _transient_timeout_ee_ and 9000K records for _transient_ee_ssn_. As soon as all purged, load normalized. I have added the code you sent for add_action above, however, all seems to be growing as usual in the minutes since purged. |
|
Sorry, that’s 9500 and 9000 records of _transient_timeout_ee_ and _transient_ee_ssn_, respectively. Already in minutes up to 27488 ee_transient_schedule characters. |
|
Already up to 44588 ee_transient_schedule characters. |
|
Have you checked the User Agent Strings within the individual transient_ee_ssn_ option values? |
|
Yes, bots, so Blackhole is not doing its job? I see bing.com and google.com bots but also opensiteexplorer.org and yandex.com and ‘James BOT’. The settings for Blackhole are very simple and straightforward, I am not receving any email alerts. I have added the robots.txt snippet and running since yesterday. |
|
Blackhole for bad bot’s effectiveness will vary depending on what the bots do. Is your server apache? If so you can black the bad bots with a few simple htaccess rules, before WP even loads (which will save your server a lot of bandwidth and resources if the bad bots are hammering the server). |
|
Okay, I setup a lot of blocks of bots yesterday via the .htaccess file and it has slowed the growth of the _transient_ee_ssn_ records, leaving only legitimate Google, Bingbot and others. The number of these records still growing with over 6000 each of the _transient_timeout_ee_ as well. The big issue seems to be the ee_transient_schedule option finding over 350K characters again this morning and causing high load on our server again. What can be done about this? |
|
Also, the snippet you sent me before for transient cleanup with limits does not seem to be doing anything. |
|
You should probably remove it then, and then try adding something like Do you have a way to enforce some rate limiting on the server to reduce frequent hits by the same IP? |
|
I’ve never used any rate limiting. The server does just fine otherwise and we don’t want to take the chance or blocking legitimate search engines. I don’t see any evidence of being needed, the entries seem to come from legitimate sources in the transient records and slower, wouldn’t these transients be an issue for highly active websites? Still having to clear all transient records matching _ee_ as well as the ee_transient_schedule option to maintain to normal load. None of our other plugins are generating this type of issue including highly used WooCommerce. I’ll read up on ALTERNATE_WP_CRON. |
|
The reason I suggest rate limiting is because of the number of transients being created. That’s not normal. What is normal is the transients get automatically deleted, but that’s not working on your site for some reason too. These issues have nothing to do with WooCommerce. |
|
Would it be better to just run a cron job on the server to call wp_cron.php versus using ALTERNATE_WP_CRON? From what I read, this is all the setting does is run wp_cron on visits and when jobs need to be ran. |
|
If you can set up your own cron job on the server, sure. One other thing you can do that will help reduce the number of session transients is you can use the Plugin Organizer plugin to disable Event Espresso on specific pages. So for example if you get a lot of traffic on your home page, and nothing from Event Espresso gets displayed on the home page (like shortcodes or widgets from EE), you can go into edit the home page and set Event Espresso to be disabled for that page. Then repeat for any pages where Event Espresso isn’t used that gets high traffic. |
|
The home page does get the most traffic and does have EE top events listed. Can you tell me what purpose the ee_transient_schedule and transient records of _transient_timeout_ee_ and _transient_ee_ssn_ serve? I was mentioning WooCommmerce just has another highly used plugin that I guess does not use transients or any other plugins let them get out of control like this. It definitely seems to be isolcated only to EE. |
|
Transients are used to track the session and the data related to that session. So for example if someone selects a ticket then moves on to the registration checkout page, EE uses that transient to keep track of their ticket selections. |
|
I am not able to get the Plugin Organizer to work on our dev site. The docs are very limited and vague, I listed EE under the Global Plugins section and Saved. The site does not seem any different and all EE functionality still seems to be working. From what I understand in the docs, that is the first step and then I must enable EE on the pages we want to be enabled. Still, the transient records pile up and have to be purged with ee_transient_schedule to keep the server from experiencing a high load. We have upgraded to latest version 4.9.51p. I’ve set up a cron job to run wp-cron.php in the site directory every 5 minutes as well. |
|
It does appear in the latest version to be fixed. The transient records are automatically purging at certain levels. |
|
The support post ‘_transient_timeout_ee_ssn_ records in wp_options’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.