Busy sites that use a lot of forms can make a lot of entries in the cache_form table. This is particuarly true of sites using Ubercart, Commerce, or other modules like Fivestar, Ideal Comments, or Hierarchical Select.
This is a very common problem which I have seen cause problems for my clients, especially when database replication is involved. A search shows how widespread the issue is: https://www.google.com/search?q=cache_form%20big
$expiry = 21600; from a hardcoded variable to
variable_get('cache_form_expiry', 21600);, users can choose how often entries are pruned from cache. With shorter lifetimes, the form_cache table will be truncated more often, and will not grow as large.
I would suggest making the default expiry one hour, rather than 6, also.
None, subject to community review (especially of the comment).
User interface changes
|#57||cache_form_expiry_to_variable-2091511-57.patch||858 bytes||Cameron Tod|
PASSED: [[SimpleTest]]: [MySQL] 41,755 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch cache_form_expiry_to_variable-2091511-54.patch. Unable to apply patch. See the log in the details link for more information. View
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2091511.43.patch. Unable to apply patch. See the log in the details link for more information. View
|#36||interdiff_32-35.patch||658 bytes||Cameron Tod|
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Drupal installation failed. View
|#36||2091511-cache_form_expiry_to_variable-35.patch||10.82 KB||Cameron Tod|
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Failed to run tests: PHP Fatal error encountered during run_tests.sh. See review log for details.. View