1 |
On 06/03/2013 22:59, Michael Mol wrote: |
2 |
> On 03/06/2013 03:54 PM, Grant wrote: |
3 |
>> I lowered my MaxClients setting in apache a long time ago after |
4 |
>> running out of memory a couple times. I recently optimized my |
5 |
>> website's code and sped the site way up, and now I find myself |
6 |
>> periodically up against MaxClients. Is a RAM upgrade the only |
7 |
>> practical way to solve this sort of problem? |
8 |
> |
9 |
> Use a reverse proxy in caching mode. |
10 |
> |
11 |
> A request served up by the proxy server is a request not served up by |
12 |
> Apache. |
13 |
> |
14 |
> Squid, nginx and varnish are all decent for the purpose, though squid |
15 |
> and nginx are probably the more polished than varnish. |
16 |
> |
17 |
|
18 |
Grant, |
19 |
|
20 |
If you optimized the site well, I would imagine your RAM needs per page |
21 |
request would go down and you could possibly increase MaxClients again. |
22 |
Have you given it a try since the optimization? Increase it slowly bit |
23 |
by bit comparing the current performance with what it used to be, and |
24 |
make your judgement call. |
25 |
|
26 |
Is there some reason why you can't just add more memory to the server? |
27 |
It's a fast and very cheap and very effective performance booster with |
28 |
very little downtime. But if your slots are full and you need new |
29 |
hardware, that's a different story. |
30 |
|
31 |
Michael's proxy suggestion is excellent too - I use nginx for this a |
32 |
lot. It's amazingly easy to set up, a complete breath of fresh air after |
33 |
the gigantic do-all beast that is apache. Performance depends a lot on |
34 |
what your sites actually do, if every page is dynamic with changing |
35 |
content then a reverse proxy doesn't help much. Only you know what your |
36 |
page content is like. |
37 |
|
38 |
|
39 |
-- |
40 |
Alan McKinnon |
41 |
alan.mckinnon@×××××.com |