简体   繁体   English

Drupal 6:使用了太多的Views模块,导致站点关闭了太多mysql连接的cos

[英]Drupal 6: using too many Views module causing site to go down cos of too many mysql connection

I have HostGator Baby Shared Plan . 我有HostGator Baby共享计划 I develop Drupal site on. 我开发Drupal网站。 everything was fine at the beginning, then by the time i go further with development, site started ti work really slow. 刚开始时一切都很好,然后当我进一步进行开发时,网站的启动速度确实很慢。 now it is not working at all. 现在它根本不起作用。 giving my sql errors like TOO many connections, etc... 给我的SQL错误,如太多的连接,等等...

I created so many blocks, pages with View. 我用View创建了很多块,页面。 so it makes my site to so much depend on database. 因此这使我的网站非常依赖数据库。 should not I do that? 我不应该那样做吗? can it be the reason of my site's no working now. 难道是我的网站现在无法正常工作的原因。

appreciate helps!!!! 感谢帮助!!!!

Don't use HostGator. 不要使用HostGator。 If you're looking for something in the same price range, try DreamHost -- they officially support Drupal on their hosting plans. 如果您正在寻找价格相同的产品,请尝试DreamHost-他们正式在其托管计划中支持Drupal。

Ferran's answer is fine once you're done developing, but you shouldn't devlop with cache turned on or else you won't be able to see your own changes. 一旦完成开发,Ferran的回答就很好了,但是您不应该在打开缓存的情况下发展,否则您将无法看到自己的更改。

Yes, Drupal uses a lot of Database. 是的,Drupal使用了大量的数据库。 However, you can cache the results of most Views (check the main screen of each view to enable it) and also there's an option to cache the blocks. 但是,您可以缓存大多数视图的结果(检查每个视图的主屏幕以启用它),并且还有一个选项可以缓存块。 It all depends in the content of your views and if users are mostly registered or anonymous. 这完全取决于您的视图内容以及用户主要是注册用户还是匿名用户。

You can also use modules like Boost which saves static html pages so for anoymous visits your database is not touched at all (just the first time, as the page needs to be generated someday...). 您还可以使用诸如Boost之类的模块来保存静态html页面,因此对于异常访问,您的数据库完全不会受到影响(只是第一次,因为有一天需要生成该页面...)。

您可能还需要检查“视图”过滤器,而不是一次获取很多行(例如,获取一周后的首页)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM