问题原文
原帖链接 · krv · CC BY-SA 3.0
Before jumping into the question let me give details about my site.
- I have a blog that is a coding blog so I have tutorials and code samples on it.
- I am running WordPress self-hosted as my platform.
- I have some of the popular plugins such as Yoast SEO,contact form 7,Google Analytics to name a few.
I have the following Godaddy hosting plan (Delux plan with added resources)
- 1gb ram
- 2 Cpu
- 1024 i/o
- 125 Entry process
The site is less than 1000 visits per day.
Yet I find that It runs out of resources.
How can this be possible?
社区高分解答
原帖链接 · Chris Rutherfurd · CC BY-SA 3.0
This can be due to a wide range of factors including the number of plugins that you are running. Some factors that need to be taken into consideration are...
- Is Caching Enabled
- How Many Images Are Being Served
- Is the Output GZiped
Basically everything that wordpress is doing will consume memory for each request. In addition to that WordPress does not scale well without some sort of caching plugin such as W3 Total Cache and WP Super Cache. Any WordPress installation should make use of some sort of caching plugin as this will esentially minimize the dynamic PHP compilation and SQL hits for each request made and instead serve cached copies of the content.
Without having access to the command line of your server to see what is consuming the most memory anyone here is only going to be able to give you reasonable guesses but the first steps would be to take the actions above.
As a side note when working with shared hosting providers I tend to calculate the average PHP application as 2MB of memory per session due to all of the added modules that many shared providers enable within Apache.
Further after checking the GoDaddy help page I found that the number of simultaneous connections is the entry process count (haven't encountered that before with other providers). You don't indicate which resource you are running out of so if it is the entry process resource you are maxing out then the only solution would be to either change to an alternate provider who doesn't apply that sort of resource limit, or to increase the number of entry processes your account can support. Additionally CRON jobs and SSH sessions count towards the entry process count as well. The entry process you provided of 125 seems unusually low for GoDaddy as they advise their delux plan has at least 300 entry processes included and in the next plan up of premium, unlimited, and ultimate, that count goes up to 600.
Try checking these out first and if none of these are the reduced resources please advise of which specific resource is being maxed out and I will post an update.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
