N
N
nollin2016-01-23 22:39:46
PHP
nollin, 2016-01-23 22:39:46

Why WEB server can't cope with the load?

Hello! Faced the following problem:
There is a dedicated server:
c2c4dd63ac864688bae36ed705abc229.png
On it are raised:
Nginx version 1.9.2.1 Lizard for Windows with advanced features (no complaints - plows in 16 shovels and does not sweat);
Apache: Server Version: Apache/2.4.18 (Win64), Server MPM: WinNT, Apache Lounge VC11 Server built: Dec 11 2015 13:02:26
PHP: PHP/5.6.17 (Win64);
Memcache Version 1.2.6;
MySQL Server 5.7 (Win64);
The project is highly loaded - a shooter game for social networks with ~ 10K users daily online (only clients, not counting game servers, which also pull the server to update the status and download player profiles).
We have the following problem: every 30 seconds Apache crashes with an error in some module:
88cc343203114b36a6f381df77542dc1.pngadd25bfdaef74018a77450e0e76df48e.png4428a713b35d40aeada583438590ed91.png3f1b16e2b3f04c94b3b6880a7375a1e2.png
How to determine the load on the server without a clue, but I can attach the server-status screen from Apache:
381a6baaac754148b8f7d5a2b1102ae2.png
In the task manager, it shows the total load on the percentage within 40%, on the memory within 25%.
Here are the configs of the elements:
Configs
There is practically no experience in administering and configuring stable and fault-tolerant web servers under loads. I tried to reconfigure to Nginx + PHP-FPM, but nothing happened - after 1 minute of work, the php-cgi crash log got out. Returned back Apache - though it falls, but immediately rises itself.
If anyone has encountered a similar problem - please advise in which direction to dig. LAMP is not offered due to the lack of experience in setting up a server even under Windows, not like under a Linux system. Yes, and I consider changing the axis on a dedicated server in another city remotely a rather problematic undertaking. Do not scold strictly, but in my philistine opinion, in this configuration, the server should hold a load of up to 20-30K users, but it does not.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nazar Mokrinsky, 2016-01-23
@nazarpc

You don't need Apache, configure Nginx+php-fpm. php-cgi is a completely different sapi, it shouldn't have anything to do with Nginx and php-fpm.
In general, raise it on a separate server (on the same laptop), connect a profiler (xdebug, blackfire, etc.) and test - see where it slows down, try loading it through Apache Benchmark. And then your "server must hold a load of up to 20-30K users" is an unreasonable finger to the sky.

V
Vladimir Dubrovin, 2016-01-23
@z3apa3a

The E5-2650 supports hyperthreading, which means that the number of real cores is half what you see and a 40% load can mean a real load of 80%, which is too much (a level above 60% is usually considered unacceptable).
Apache crashes are unlikely to be directly related to the load, if your game has something that is implemented as fcgi, ActiveX or otherwise loads binary code into the Apache process, then the problem most likely needs to be looked for in your code, the heap is corrupted somewhere. Also, crashes can be caused by a bad memory module, especially if the crashes are in different places. Test the memory, reduce the load.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question