Cache_bootstrap is growing uncontrollably on my site. Its not obviously linked to any change of data, code. module etc but it has been growing at about 10k/minute since Friday 13th Jan.

Clearing all caches manually clears it but this is clearly not a solution.

php version 5.3.28

Any ideas?

Comments

James Parker created an issue. See original summary.

James Parker’s picture

Further detail to the above cache_bootstrap has grown to over 300MB is just 6 hours. Is this something which could be caused by some sort of DOS attack/something repeatedly polling the site? If so, is there any way to stop it other than blocking offending clients? If not then what else could cause this effect.

By the way I have disabled page and block caching but this has made no change, I guess bootstrap is not affected by these switches.

Many thanks to anyone who can suggest anything to look into.

cilefen’s picture

Title: cache_bootstrap growing uncontrollable » cache_bootstrap growing uncontrollably

Page and block caching have their own tables. What is in the rows that are filling cache_bootstrap up?

James Parker’s picture

StatusFileSize
new168.03 KB

It looks like system_list is filling the cache up and its a longblob so I cant easily tell whats in it. To be honest Im struggling to interpret the phpmyadmin display for the bootstrap cache as the views don't seem quite consistent. The attached screenshot (taken relatively shortly after the cache was cleared so the bootstrap cache hasn't grown particularly large yet) shows the view of the database as a whole and the view of the bootstrap cache tables, both in phpmyadmin.

There is some evidence that the site is being subject to an attempt to find wordpress vulnerabilities (there are from time to time 404 errors at the rate of about 5 per minute due to attempts to access pages with 'wp-content' in the url with other parts of the url obviously being references to wordpress modules) and some further evidence that the rate of cache growth is less when the source ip for the attempted hack is blocked.

James Parker’s picture

Version: 7.53 » 7.56

My site is still experiencing the problem that cache_bootstrap is growing uncontrollably. The database reached 4Gb over the weekend! Following a restore and flush of all caches the database size reduces to about 100Mb, growing to 220Mb in about 3 hours, of which almost all is due to cache_bootstrap.

Has anyone see this issue and does anyone have any ideas?

Ive turned off page caching but the problem still occurs. Clearing 'page and else' reduces the size back down but I cant do this every few hours

Drupal 7.56, php 5.6

cilefen’s picture

I am attaching a related issue with some notes. It would be good to find out if there are too many rows, and to analyze if there are any giant blobs.

bcuser30’s picture

I'm also encountering this problem using Drupal core 7.56. This started to become a noticeable issue for us about 2 weeks ago and I'm unsure what triggered it or how to resolve.

cilefen’s picture

It would be good to know which rows in the cache are big or too numerous.

James Parker’s picture

Since I first posted this the issue has recurred irregularly but roughly every three months. It sticks around for about 3-5 days then spontaneously goes away. The database has grown as large as 3Gb on a couple of occasions.

It's happening at present and very annoying. I am on the most recent Drupal 7 release

Did anyone find out any more?

Assuming it's still happening tomorrow I'll try to post some diagnostics.

James Parker’s picture

StatusFileSize
new295.2 KB

Further to the above the database size on my site grew from 140MB to 912MB in 10 hours yesterday. Other statistics are

Drupal version 7.59
Server version: 10.1.27-MariaDB - MariaDB Server

10 hours after clearing page & else cache (approx 10pm GMT, 28th July):
Database size on disk: 912MB
Size when backed up to sql using phpmyadmin: 54MB
Cache_bootstrap size reported by phpmyadmin: 757MB
Cache_bootstrap view from php myadmin attached

Immediately after clearing page & else cache (approx 8am GMT, 28th July):
Database size on disk: 140MB
Size when backed up to sql using phpmyadmin: 50MB
Cache_bootstrap size reported by phpmyadmin: 6.5MB
Cache_bootstrap view from php myadmin attached

Looking into the phpmyadmin view of cache_bootstrap doesn't show anything obvious (at least not to me). None of the five individual rows (consisting of five blobs) appear to be particularly large despite the fact that phpmyadmin reports the overall size of cache bootstrap as abnormally large. Database Diagnostics.pds shows the screenshots

If anyone has seen something similar (bcuser30?) and/or has any ideas I would be most grateful

James Parker’s picture

Version: 7.56 » 7.59
dshakya’s picture

Is there any solution to this one? I am experiencing the issue as well. I have 5 rows in _cache_bootstrap with a total of not more than 200KB but the table size is reported as bring 1.2GiB. Where is the rest of the storage used coming from? Using PHP 5.6.38 with Drupal 7.X

Andrew Schulman’s picture

We're currently dealing with this problem by running a nightly cron job to truncate the cache_bootstrap table:

echo truncate table cache_bootstrap | mysql $db

And yeah, we also see just 5 rows in MySQL, but 15 GB of storage used for the table before we truncated it. The above brought it back down to 200 KB.

cilefen’s picture

Has anyone tried OPTIMIZE TABLE?

Andrew Schulman’s picture

Yes, optimize table cache_bootstrap also works for us. Thanks.

cilefen’s picture

Status: Active » Patch (to be ported)
cilefen’s picture

Status: Patch (to be ported) » Fixed
Andrew Schulman’s picture

Status: Fixed » Active

@cilefen, I don't think you meant to mark this issue as fixed?

cilefen’s picture

Indeed I did. It's a support request, and two acceptable answers were given.

Andrew Schulman’s picture

Status: Active » Fixed

OK.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.