×
Hey-Ai Chat

Check out the Hey-Ai discord / chat here !

× Before inquerying, please go sure your topic has not been discussed, yet. Also, for some aspects of using Hey-AI!, there is an FAQ .

Please upgrade the servers

More
13 years 2 days ago #185924 by darkgrey
i second this, and an extra order of fries prease

Please Log in or Create an account to join the conversation.

More
13 years 1 day ago - 13 years 1 day ago #185937 by kensup
I assume, and hope your website crashes are caused by apache running out of memory on your VPS. If so, you can probably increase your traffic capacity by a factor of several hundred.

The solution to your problem is simple, free, and guaranteed to stop your crashing. Set up nginx as a reverse proxy in front of your apache, on the same VPS as your apache.

Why? Apache is process-based. Every request to Apache spawns a new process. Every process = a lot of memory. When coupled with keep-alive, this is very bad. This consumes way more memory than it is worth, crashes your server, and leaves you with unhappy users.

Every request to Nginx, on the other hand, simply enters nginx's event loop. Nginx maintains one process for all requests.

In sum, simplified:
let y = memory*time required per process (let's just assume they're the same for Apache and Nginx, diff is not important for this example)
let z = memory consumed by inter-nginx-apache communications
memory for Apache(x = # of requests) = x * y
memory Nginx(x) = y + z
x * y >>> z when x > some trivial number of requests

So with Nginx in front of Apache, you activate keep-alive on nginx, turn it off on Apache, and so long as they are both on the same VPS, Apache's response time to Nginx will be negligible -- i.e. vastly increased capacity.

I believe I just solved our server problems without costing us a penny. Please remove my minus points.

Not to be taken seriously.
Last edit: 13 years 1 day ago by kensup.

Please Log in or Create an account to join the conversation.

  • cheeselol
  • cheeselol's Avatar
  • Visitor
  • Visitor
13 years 1 day ago #185939 by cheeselol
Replied by cheeselol on topic Re: Please upgrade the servers
Hi Kensup, I'm looking for my mind you just blew out of the universe.
┌( ಠ_ಠ)┘

Please Log in or Create an account to join the conversation.

  • tenshi
  • tenshi's Avatar
  • Administrator
  • Administrator
  • Epitaph
More
13 years 1 day ago #186072 by tenshi

kensup wrote: I assume, and hope your website crashes are caused by apache running out of memory on your VPS. If so, you can probably increase your traffic capacity by a factor of several hundred.

No, sadly it is mysql which drags the server into the abyss.

kensup wrote: The solution to your problem is simple, free, and guaranteed to stop your crashing. Set up nginx as a reverse proxy in front of your apache, on the same VPS as your apache.

Now, this is a constructive suggestion. - As soon as we have some time we will give it a try, again. Last time, something went wrong with stupid Plesk, and the server (yes, the server, meaning also SSH, etc.) was unreachable.
But, should we manage to get it working somehow, it might take away some stress and allow mysql some more memory...

Please Log in or Create an account to join the conversation.

More
13 years 1 day ago - 13 years 1 day ago #186082 by kensup
MySQL memory consumption can be dramatically reduced by implementing memcached or redis. They may require changes to source code, and memcached does consume some memory, but that should alleviate mySQL overloads, and may prove to be much cheaper than buying more mySQL servers.

You can also audit and optimize the mySQL queries, because some are inefficient for sure.

Not to be taken seriously.
Last edit: 13 years 1 day ago by kensup.

Please Log in or Create an account to join the conversation.

  • ralph
  • ralph's Avatar
  • Visitor
  • Visitor
12 years 10 months ago #195131 by ralph
Replied by ralph on topic Re: Please upgrade the servers

kensup wrote: There is an alternative solution to upgrading the servers -- optimizing the codebase. I can guarantee that the Joomla code being used and the database queries are inefficient -- not to mention that PHP is just an inefficient language in general, when compared to the likes of Python, Java, etc.

In laymen's terms, reduce resource usage instead of increasing the resource pool.


hey! i'm a php developer :angry: grrrrr!!!! :angry: haha

i do agree that joomla is bloatware but there is no other choice unless you hire developers.

Please Log in or Create an account to join the conversation.

  • Kenneth Loo
  • Kenneth Loo's Avatar
  • Visitor
  • Visitor
12 years 10 months ago #195133 by Kenneth Loo
Replied by Kenneth Loo on topic Re: Please upgrade the servers
if this site is down forever,all will be lost!!!:O

no more stalking:(

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum