YY博客

分享英语网站运营的经验

By

Datalife Engine负载方面的问题和一些处理建议

有些Datalife Enigne的用户对DLE的负载很担心,怎么DLE在使用过一段时间后,负载会越来越大?这里就简单分析一下这方面的问题。

一些用户在DLE站点运营了一段时间以后,会偶尔出现负荷超载的问题“DLE SQL queries using 100% of CPU and Memory on webserver”,有些同学甚至因为使用虚拟主机经常超载而导致被警告甚至封号。难道DLE的负载很差吗?或者是因为我们没有下载到合适的版本吗?亦或者有些DLE的破解团队的破解技术不好吗?

这里还是要澄清一个事实:“所谓破解只是突破DLE的授权验证系统,对程序功能相关的文件并没有影响”。所以如果我们在使用中遇到了什么不顺利的事情,我们应该首先想办法解决问题,而不是去抱怨、谩骂破解团队或破解系统提供者。大家都是基于兴趣来无私分享自己的知识和成果,没有人向你保证过什么,也没有义务为你处理你遇到的问题,因为你选择了一个破解版,那么你也必须为你自己的决定承担必要的风险。

那么为什么别人没有遇到的问题,偏偏我遇到了呢? 咱们先来个自我检讨,看看下面这几方面我们考虑到了没有

1.Datalife Engine服务器配置要求 (注意:你的服务器可能满足了最低服务器要求,所以可以正常安装,但是没有达到建议的服务器要求,部分要求高的功能如果你没有关闭就会导致服务器不能满足需要)
2.总是看到插件就安装 (典型的wp病,看到插件不错就安装,但这些插件却几乎不用。。。。)
3.谨慎安装大型插件 (有些插件要求占用大量的系统资源,所以安装插件之前一定要对插件有一定的了解)
4.为了达到某些目的随意更改代码 (如果增加了额外的不严谨的代码,增加了很多SQL查询的话,负载肯定会升高)
5.随意仿制其他站点的插件 (有时别的站可能用了一个小插件实现了某些功能,你可能认为不错,就自己构思并在自己的站点实施了,但是为了实现这些功能,浪费了大量的服务器资源)
6.经常使用采集软件或插件 (采集软件会瞬间出现大量的SQL查询,服务器超载在所难免)
7.Datalife Engine后台设置时,开启了过多消耗资源的功能

遇到了这些问题,我们怎么办!
重要:任何大的改动,务必先备份数据库

1.我们安装Datalife Engine站点之前,请先仔细看下DLE对应版本的最低服务器配置和建议配置。如果你的预算有限,服务器配置有限,那么在后台设置时,尽可能多的关闭浪费资源的功能,在 后台 》系统性能分析 查看占用资源多的功能并关闭。
2.安装插件要谨慎。DLE站点的插件一般都要改的一些代码,修改代码要谨慎,严格按照步骤来。另外就是要清楚那个插件是站点必须的,那个是自己喜欢的。站点必须的当然要安装,如果是自己喜欢的一定要三思而行,越来越多的插件会成为站点的隐形杀手。
3.谨慎安装大型插件。安装占用资源多的插件对站点的负担是非常重的,而且有一个坏消息是:DLE站点是通过index.php文件来统一调用每个插件的,所以当你安装了几个插件以后,你不知道究竟哪个插件是导致站点崩溃的罪魁祸首,需要一个个插件重新测试过来。所以最好不要安装多个太占用资源的插件。
4.不要为了仿站因小失大。有些有一定代码基础的同学喜欢去实现别人站点的功能。但是有时候会遇到一些情况,其他站点可能是安装了一个小插件就实现了某个功能,而自己却费了很大精力自己写代码却破坏了程序结构,导致系统负荷过重。
5.谨慎使用采集器,这个不用多说了。
6.最后说一说DLE的系统设置,上面几点遇到的相对比较少,下面这些设置不当却可能经常会遇到。

  • Show on site news, the article date which has not yet occurred: Recommend to set “No” (关闭预显示未发布文章功能)
  • Automatically generate of alphabetical catalog of articles: Recommend to set “No”, this could cause double query (关闭自动获取文章首字母作为catlog标识符的功能)
  • Enable automatic conversion options: Recommend to set “No” (关闭自动转化http://链接)
  • Show articles in subcategories: : Recommend to set “No” this will take a lot of server resources (关闭显示子分类文章)
  • WYSIWYG editor: recommend to use bbcode because WYSIWYG will take double resources compared to BBCode mode on loading (关闭所见即所得编辑器,建议使用BBCode编辑器)
  • Enable SmartCache: This highly recommend to set to “Yes” this will help a lot of server resources reduction! (开启缓存功能)
  • Enable comments caching: Always set to “Yes” because if there are 10 comments in 1 topic, when visit that topic, comment will query 10 times not include additional tpl tags, so set it to Yes is highly recommended! (开启评论缓存功能)
  • Enable Gzip: This option is very important that people look over it, 99% of website that have server overload set this option to “Yes“, what the peoole don’t know about this option is that it’s save some bandwidth on both server and client sides because it compress html output so that your users/visitors can see your website loading faster, but behind the scene, this option is primary server killer because this couls easily use 50% and up of your server resources, yes, your visitor will see your website faster but your server is crying, if you have 20,000 articles and have 200 visitors browsing your website at the same time, your server could suffer over 75% of CPU…you might think this option is good for loading faster but resources on server can be maximized, so enable this setting allows you to save user traffic, but increases the load on the processor on the server, so if you are experiencing problems with the load on the CPU, we recommend disable this option (一定开启Gzip压缩功能)
  • Future dates publishing module: recommend to use off (关闭预发布文章)
  • Enable calendar: Calendar is one of the biggest modules that query heavily database, most of website enable it but never been used or not need, consider disable it is my high recommendation(日历功能很强,不过占用资源也多,自己考虑是否开启)
  • Activate the TagCloud module: We all know that this module is very helpful in search engine but it takes a lot of server resources, if your website ranked 3 and higher, I would recommend to turn it off(标签云功能也是常有功能,不过占用资源也不少,如果站点权重已经很高了,关闭也不错)
  • Choose type of searching for used on site: many website use text-through for search, which will get better and exact results of search but this take a lot of mysql resources, and this could flood the incoming search keywords from search engine, so I would recommend “simple” search will do just fine(选择搜索类型,全文搜索肯定搜到的结果更精确,不过简单搜索会更有效率和更少的资源占用)
  • DO NOT pin all articles in your website, I see many websites set articles to pin or fix, don’t do that, you should not have more than 3 pin articles in your website(建议不使用文章置顶功能)
  • Disable “sort” option: this is heavily query on sorting the articles, if you don’t need it, disable it.(关闭文章重排功能)
  • Can users change your website skin?: Always turn it off, big server cpu consuming!(关闭切换模板功能)
  • Enable quick search: The king of CPU killer(CPU杀手:快速搜索建议功能)
  • Include support multicategory on site This is the top 3 server resources overload, this option will cause server query more than double or most likely triple queries…(支持多分类发布功能)
  • Don not use different version of database with wrogn version of script versions, for example using 9.0 database on 9.4 DLE script, never do that!(一定不要使用不同版本的数据库,比如9.0的数据库用到9.4站点)

问题还没有解决?
现在问题还没有解决,可能是你改动了什么,自己都忘记了吧。如果真的是这样,只能使用最后的必杀技了:重新下载一个相同版本的程序,重新安装吧!注意如果之前你改动过数据库的前缀,请保持数据库的前缀PREFIX相同。

如果你确认站点没有任何问题,只是因为流量太大导致站点崩溃,那么可以使用Memcached功能,通过多服务器分担站点的负担。免费的云服务器Cloudflare。

转自 dleseo.com

By

Datalife engine(DLE)的邮件设置

DLE的找回密码,注册等都需要邮件发送到用户信箱,如果你的vps装了邮件系统,可以直接使用,否则你必须使用第三方的smtp服务。

 

gmail的邮箱设置如下:

管理员的E-mail地址:[email protected]
SMTP主机:tls://mtp.gmail.com
SMTP端口:465
SMTP用户名:[email protected]
SMTP密码:您的Gmail帐户密码
E-邮件发送方SMTP服务器的授权:[email protected]
=============

你可以使用其他允许使用smtp的邮件提供商,yahoo.com 经过测试不允许使用,需要缴费。gmail不能开启2次验证。

By

[必备] SEO效果非常好的Referer插件v9.6