Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Server Keeps Going Under — Incredible # of Connections

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
geekplaya
Posts: 9
Joined: Thu Sep 10, 2015 6:29 am

Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by geekplaya » Sun Feb 21, 2016 6:27 pm

I have been troubleshooting this problem for months now. For whatever reason, my web server keeps going down.

Randomly, a couple times a week, the server gets overloaded, all the memory becomes consumed, and the sites become inaccessible. I will also get e-mails from VestaCP telling me that the files cannot backed up.

I have tried enabling mod_status, I have tried optimizing Apache2 and MySQL, and I have implemented Cloudflare in case it was a DDOS.

Take a look at the graphs. The numbers are ridiculous:

Image
Image
Image
Image

Right where you see the first peak is where the server goes down.

How could that many SQL queries even be executed?

How can I trace this and find out where the problem is? Is it a memory leak? Is it an injection? What's going on! For months I've been dealing with this.

Restarting Apache and clearing the memory brings everything back online, but it just happens again.

Here's the Apache config:

Code: Select all

PidFile ${APACHE_PID_FILE}
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 1

<IfModule mpm_prefork_module>
    StartServers                 5
    MinSpareServers              1
    MaxSpareServers              5
    ServerLimit                  10
    MaxRequestsWorkers           10
    MaxClients                   10
    MaxRequestsPerChild          100
</IfModule>
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by tjebbeke » Sun Feb 21, 2016 10:13 pm

Are you using some CMS? Have you checked the log files? MySQL logs, Errors logs, access logs ...
Top

geekplaya
Posts: 9
Joined: Thu Sep 10, 2015 6:29 am

Re: Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by geekplaya » Mon Feb 22, 2016 3:34 pm

tjebbeke wrote:Are you using some CMS? Have you checked the log files? MySQL logs, Errors logs, access logs ...
I am using 5 installations of WordPress. I have 2GB of RAM, and the site will run stable (as you can see from the graphs) for a while, then suddenly spike a tremendous amount.

When I run the top command, it shows nothing out of the ordinary which is the strangest part.
Top

websystems
Posts: 31
Joined: Wed Oct 18, 2017 6:34 am

Re: Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by websystems » Thu Jul 05, 2018 10:23 am

Similar problem here. Did you find a solution?
Top

dreiggy
Posts: 154
Joined: Thu May 17, 2018 8:05 pm
Contact:
Contact dreiggy
Skype

Os: CentOS 6x
Web: apache + nginx
Re: Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by dreiggy » Sat Jul 07, 2018 11:03 pm

First, try to find out which page has most of users visits. You can do this for example:

Code: Select all

# du -s /var/log/httpd/domains/*.log | sort -n | tail
Then try to analyze the biggest log file with goaccess:

Code: Select all

yum install epel-release -y
yum install goaccess -y
Then: goaccess -f /var/log/httpd/domains/domain.log

By the way try scan websites with maldet.
Top

Yikmings
Posts: 17
Joined: Fri Nov 22, 2013 4:51 pm

Re: Server Keeps Going Under — Incredible # of Connections
  • Quote

Post by Yikmings » Sun Jul 15, 2018 4:29 pm

Same problem after upgrade to 22
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password