开发者

Which Drupal MySQL tables are safe to clear (and when)?

开发者 https://www.devze.com 2023-02-28 22:48 出处:网络
I\'m adding modules to a Drupal site and am getting dreaded fatal memory errors. I went to clear the accesslog, cache, and watchdog tables, but am still getting such errors. I\'m only running one data

I'm adding modules to a Drupal site and am getting dreaded fatal memory errors. I went to clear the accesslog, cache, and watchdog tables, but am still getting such errors. I'm only running one database on this site and it's for Drupal use, but I am wondering what other tables I can free up. I'm sure some of the myriad tables listed in phpMyAdmin are more critical to Drupal than others. Can I blindly clear all tables with "Overhead" or would tha开发者_运维知识库t be a major faux pas?

Any insight would be most excellent.


No, you can not simply clear some tables. It also doesn't help at all with out of memory errors anyway.

There are really only two ways to fight out of memory errors. a) Increase the memory limit, 64MB should be the minimum, with many modules, it might even need more. and b) disable some modules.


To add to Berdir's answer, a c) would be to profile memory usage and figure out what's eating memory, and if there's a way to optimize or cache it's output.

Install devel and turn on performance logging, it'll tell you what queries and modules are eating up the most memory. You can also use xdebug and a cachegrind utility to diagnose this in-depth, but it'll take a while to set up.

If you truncate database tables, the problem will just come back when more stuff fills up those tables.

Best thing to do is just to increase your PHP memory limit, though.

0

精彩评论

暂无评论...
验证码 换一张
取 消