skip to Main Content

wordpress博客出现403错误解决方法

(2015年8月1日补充说明:非常喜欢截图,可惜2015年7月以前所有博客的插图都没了。因为当时主机里的图片越来越多,我想删掉就删掉吧,要不然就要花钱升级了.我表示以后尽量少玩截图。我表示不再是截图小王子了。)

昨晚在家写博客,发了两篇,发到第三篇一直显示缓冲,我等啊等。等了半个小时缓冲结束了,却显示403错误。然后换再怎么刷新和浏览器都不行。
第二天早上还不行,于是我求助于空间商江老师。
江老师说我的账户应该是出现问题了,并问我是怎么发的文章的。
我说正常发文章啊,发文章还能怎么发呢。这个目录下有不少博客,其它都没事,只有http://jackrubbish.com/blog这个博客出现403.虽然我这个主机磁盘不够了,但估计不是主机的原因。
然后江老师把邮件转发给我了,如下所示:

I apologize, but I was forced to suspend the script /home/jackrubb/public_html/blog as it was causing a high load on the server, and due to it affecting all of the other accounts on the system, I was forced to take immediate action for the health of the server.

Unfortunately I do not have any specific recommendations for this script, however, in general, adding some sort of caching mechanism, where the script does not need to generate a new page with every request, helps to lower the over load that a script will cause. Likely the original author or support group of the software that you are using will be able to help you to understand how to add something of this nature.

If you reply back to this with your IP address (http://www.hostgator.com/ip.shtml) we will be more than happy to go ahead enable HTTP access for you, so that you can safely work on the script without it causing further issues. Please let us know how you would like to proceed.

以下为聊天记录:

Jiang(江):基本都是发布文章过程中出现的问题。是你的文章特别长吗?
潇遥:前晚发的几篇几万字转载的,昨晚发的几篇不长。这个博客平时发布文章都比其它博客要慢一分钟,发布两分钟才能发出去。那我怎么解决呢?
江老师说:建议你用windows live writher这样的客户端来发布。我前面就给你说过,建议你使用其他正常的工具发布文章。
潇遥:那怎么恢复呢
Jiang(江):看你有什么办法恢复?如果能够恢复正常的资源占用情况,不会给主机带来不稳定因素 ,就可以恢复哦。
潇遥:怎么能够恢复正常的资源占用情况呢?该如何操作呢?
Jiang(江):不知道你做了哪些操作 ,你可以看看邮件里的介绍 ,回忆一下。
潇遥:我没有任何操作啊,我就点击发布啊。不过我这个博客更新非常频繁,但其它博客都正常使用。
Jiang:这样吧,关闭所有的插件试试看
潇遥:我进入不了后台,我在cpanel里关闭吗?
Jiang(江):http://www.ip138.com 你先查查自己的ip多少
潇遥:您的IP是:[117.89.34.167] 来自:江苏省南京市 电信
Jiang(江):http://www.hostgator.com/ip.shtml 这个页面里的红色ip多少?
潇遥:IP为117.89.34.167。我现在在公司,是昨晚是用我笔记本出错的。
Jiang(江):我知道,稍后技术人员会给允许你这个ip进行访问,检查一下有哪些问题,可以进入后台处理
潇遥:稍后我就可以进入我的博客后台进行处理,是吧?
Jiang(江):wp本身数据库有权限,发表文章占用资源特别大,尤其是你连续多发。以前有个用户,使用一些采集工具发布,几乎每天都被屏蔽
潇遥:哦,可能是这个原因吧。我这一周每天晚上都发十几篇,但昨晚发了三篇就不行了
Jiang(江):这个东西不会说一天造成的,技术人员每天都在监控每个账户,要是只有那么一会或者很短的时间,不影响稳定,说实话也就过去了。没有必要每次资源超标都给用户关掉
潇遥:那大概多长时间能恢复呢
Jiang(江):通常半个小时到两个小时吧

十分钟后……

Jiang(江):应该可以了 ,你去修复一下吧
潇遥:是的,我不知道修复什么啊,插件还有呢
Jiang(江):你的关键是不要连续发文,其实别的都不重要。参考一下这篇文章吧,如果有插件有问题,先关闭再说

http://support.hostgator.com/articles/specialized-help/technical/wordpress/optimizing-wordpress

附:hostgator上的文章如下:

Optimizing WordPress

WordPress is currently one of the most popular blogging/CMS applications. Here are some ideas for optimizing WordPress and reducing the CPU consumption of this PHP script.

  • Make a backup of your account first, and then upgrade to the latest version of WordPress. The latest versions have optimized code that could reduce the CPU consumption of your site.
  • Install WP Super Cache or W3 Total Cache, which can be done from your WordPress Dashboard under Plugins. Follow the links below for information on how to setup these plugins.
    • WP Super Cache (recommended)
    • W3 Total Cache
  • Many themes are more CPU intensive.
    • Make sure your page loads are generating no errors in your Error Log (in cPanel under Logs)
    • Also, if you’re using dynamic image resizing, you may want to disable this if possible.
    • If all else fails, contact the theme provider for assistance, or change to a different theme.
  • Disable CPU intensive plugins, or plugins that you no longer need.
    • All related posts plugins (WordPress Related Posts, YARPP) can cause significantly high load in most cases.
    • WPRobot3 and other auto-posters can also cause high load issues, and should be disabled if they are causing issues
    • StatPress and other wordpress statistics software should also be disabled, as these too can consume too much CPU in certain cases. Use Google Analytics instead for statistics.
    • Any other plugins that are not vital to your WordPress should be disabled.
  • Manage Spam bots. Non-human visitors/posters (aside from web spiders) should be blocked. Use a captcha such as SI CAPTCHA to prevent comment spam.
  • Lower the rate web spiders crawl your WordPress blogs, if you have a large amount of blogs hosted under your account. High crawl rates can drive up the load on the server, as many bots try to index your sites. How?

These changes are not guaranteed fixes, but do provide a starting ground for correcting high load issues on WordPress sites. If there are any questions about this, don’t hesitate to contact support.

 
梦千寻 文章发布于 2013 年 5 月 3 日