LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Slow loading / barely working websites after moving to a different server (https://www.linuxquestions.org/questions/linux-newbie-8/slow-loading-barely-working-websites-after-moving-to-a-different-server-4175582127/)

AdultFoundry 06-13-2016 02:32 AM

Slow loading / barely working websites after moving to a different server
 
I am moving two websites from a managed server to a self-managed one for the first time, and they barely work, load very slow. It would be good to get it to work asap as they are getting some good traffic. Can you tell me what things should I check? It is Centos &, update and upgrade done. Other websites that are on this server work 100% good, so I am not sure what the deal with this is.

Edit:

It is two websites based on different scripts, first is pinboard and the other is a Wordpress blog. Both work the same way, very slow, and barely work, but they work. DownOrJustMe.com shows that they are down. I would need to resolve it fairly fast.

AdultFoundry 06-13-2016 03:01 AM

Another website that I had there does not work also. It looks like a lot of mess. I am having some kind of problem here. Maybe you could give me some suggestions on what I should check / do/

I restarted httpd and mariadb, wrote down the locations of the error logs httpd and mariadb (not too much info in the second one).

Lets say you come in to a system / server with 5 websites, and nothing works, and you need to figure out why. What would be the general framework and points that I need to check?

AdultFoundry 06-13-2016 03:19 AM

Make sure httpd and mariadb.service are running (they are), make sure the paths and database info in config files are correct (I checked that several time and everything is ok), look at the error logs (which ones, httpd only?). What else? Around 1,000 daily traffic to the sites. Two seem to work now, one does not load, but it was not working very good on the previous managed server too. It used to work yesterday and I was going to improve how it works, but it does not load now.

AdultFoundry 06-13-2016 03:33 AM

systemctl status httpd.service

mod_evasive: Blacklisting <ip here>: Possible Dos attack.

And this is in red.

Edit:
I've had logwatch installed, maybe this can help. It looks like restarting httpd.service helps, but one of the websites does not work still.

AdultFoundry 06-13-2016 06:37 AM

I get a strange error, in red, when I enter systemtcl stauts http. It looks like mod_evasive blacklist my own IP (the server IP, the one on which the websites are hosted) because of a possible DoS attack.

I also have a lot of httpd processes listed, like Total requests 2224, this looks strange, normally it would be like less than 10. So my own system generates that and things dont work? I have no clue what may be going on.

http://prntscr.com/bfsr61
http://prntscr.com/bfsreg
http://prntscr.com/bfsryy

And the IP that I have erased on the screenshot its my own IP, the one that I use to log in to the system.

AdultFoundry 06-13-2016 07:49 AM

I think that this is the right direction here:

First, since you just recently moved to this self-managed server, I am guessing that MySQL's (or MariaDB) configuration file are using the default settings and are not configured to your server. Since your sites sometimes connect, you know that the website's configuration files are using the correct login credentials. However, if the max_connections setting in my.cnf is too low, then when that limit is reached your visitors will not make database connections until some the connections leave. Working on your my.cnf would be a good place to start your investigation.

Another consideration regarding MySQL is it is also possbile when you were on the other server, the indexes in your tables might have been large, and your my.cnf had the correct innodb_buffer_pool_size as well as the correct Key_buffer_size settings to accomodate the large indexes. If your current my.cnf is using the default settings, then your server will use excessive disk i/o slowing the queries and raising the load.

AdultFoundry 06-13-2016 08:04 AM

http://www.linuxquestions.org/questi...57#post5560157


All times are GMT -5. The time now is 07:44 AM.