Extreme slow performance after changing machine ip
Extreme slow performance after changing machine ip
I changed a machine IP and now I have a few pages of a custom site that loads in ~1 minute.
I tried almost everything on fixing but without any luck. The page in question on my local PC loads in under 5 seconds while on the server takes ~1 minute.
I increased the timeout time to 60 seconds, now I don't get error 500 anymore but it loads in a minute and I can't launch the site like that.
There are no errors, my mysql profiles shows that the queries on that page finish after 50ms and there's no other php logic in there that could take up for the remaining of that time, no loops, no processing.
I upgraded PHP to 5.6 from remi repository but didn't fix the issue, I changed the templates for nginx and apache to see if anything changes but still no luck. Templates used right now both default, for Nginx and Apache.
The problems started after I moved the VM on a different host and I changed the IP from VestaCP.
Any other ideas that I could pursue ?
I tried almost everything on fixing but without any luck. The page in question on my local PC loads in under 5 seconds while on the server takes ~1 minute.
I increased the timeout time to 60 seconds, now I don't get error 500 anymore but it loads in a minute and I can't launch the site like that.
There are no errors, my mysql profiles shows that the queries on that page finish after 50ms and there's no other php logic in there that could take up for the remaining of that time, no loops, no processing.
I upgraded PHP to 5.6 from remi repository but didn't fix the issue, I changed the templates for nginx and apache to see if anything changes but still no luck. Templates used right now both default, for Nginx and Apache.
The problems started after I moved the VM on a different host and I changed the IP from VestaCP.
Any other ideas that I could pursue ?
Re: Extreme slow performance after changing machine ip
http://domain.com:8080 doesn't work either, I get connection timed out. How could I debug this ?
Re: Extreme slow performance after changing machine ip
I restarted iptables => no change
I stopped iptables => http://domain:8080 shows a blank page and no longer timeouts but those pages are still slow.
I stopped iptables => http://domain:8080 shows a blank page and no longer timeouts but those pages are still slow.
Re: Extreme slow performance after changing machine ip
Any help or ideas are welcome!
Re: Extreme slow performance after changing machine ip
This are the rules in iptables:
[root@s01 ~]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-VESTA tcp -- anywhere anywhere tcp dpt:us-srv
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
fail2ban-MAIL tcp -- anywhere anywhere multiport dports smtp,urd,submission,ms-v-worlds,pop3,pop3s,imap,imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere multiport dports http,https
ACCEPT tcp -- anywhere anywhere multiport dports ftp,entextxid:12100
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere multiport dports smtp,urd,submission,ms-v-worlds
ACCEPT tcp -- anywhere anywhere multiport dports pop3,pop3s
ACCEPT tcp -- anywhere anywhere multiport dports imap,imaps
ACCEPT tcp -- anywhere anywhere multiport dports mysql,postgres
ACCEPT tcp -- anywhere anywhere tcp dpt:us-srv
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- feel.radiaan.com anywhere
ACCEPT all -- localhost anywhere
ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp spt:ftp
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
ACCEPT tcp -- anywhere anywhere tcp spt:smtp
ACCEPT udp -- anywhere anywhere udp spt:domain
ACCEPT tcp -- anywhere anywhere tcp spt:http
ACCEPT tcp -- anywhere anywhere tcp spt:https
ACCEPT tcp -- anywhere anywhere tcp spt:pop3
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere tcp spt:imap
ACCEPT tcp -- anywhere anywhere tcp spt:mysql
ACCEPT tcp -- anywhere anywhere tcp spt:postgres
ACCEPT tcp -- anywhere anywhere tcp spt:webcache
ACCEPT tcp -- anywhere anywhere tcp spt:8433
ACCEPT tcp -- anywhere anywhere tcp spt:us-srv
ACCEPT tcp -- anywhere anywhere tcp spts:entextxid:12100
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-MAIL (1 references)
target prot opt source destination
REJECT all -- vm-web.uw.ru anywhere reject-with icmp-port-unreachable
REJECT all -- 80-82-65-61.vmnode.pw anywhere reject-with icmp-port-unreachable
RETURN all -- anywhere anywhere
Chain fail2ban-SSH (1 references)
target prot opt source destination
REJECT all -- 58.218.205.66 anywhere reject-with icmp-port-unreachable
REJECT all -- 110.77.223.246 anywhere reject-with icmp-port-unreachable
REJECT all -- 58.218.205.77 anywhere reject-with icmp-port-unreachable
RETURN all -- anywhere anywhere
Chain fail2ban-VESTA (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain vesta (0 references)
target prot opt source destination
[root@s01 ~]# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
fail2ban-VESTA tcp -- anywhere anywhere tcp dpt:us-srv
fail2ban-SSH tcp -- anywhere anywhere tcp dpt:ssh
fail2ban-MAIL tcp -- anywhere anywhere multiport dports smtp,urd,submission,ms-v-worlds,pop3,pop3s,imap,imaps
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere multiport dports http,https
ACCEPT tcp -- anywhere anywhere multiport dports ftp,entextxid:12100
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere multiport dports smtp,urd,submission,ms-v-worlds
ACCEPT tcp -- anywhere anywhere multiport dports pop3,pop3s
ACCEPT tcp -- anywhere anywhere multiport dports imap,imaps
ACCEPT tcp -- anywhere anywhere multiport dports mysql,postgres
ACCEPT tcp -- anywhere anywhere tcp dpt:us-srv
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- feel.radiaan.com anywhere
ACCEPT all -- localhost anywhere
ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp spt:ftp
ACCEPT tcp -- anywhere anywhere tcp spt:ssh
ACCEPT tcp -- anywhere anywhere tcp spt:smtp
ACCEPT udp -- anywhere anywhere udp spt:domain
ACCEPT tcp -- anywhere anywhere tcp spt:http
ACCEPT tcp -- anywhere anywhere tcp spt:https
ACCEPT tcp -- anywhere anywhere tcp spt:pop3
ACCEPT udp -- anywhere anywhere udp spt:ntp
ACCEPT tcp -- anywhere anywhere tcp spt:imap
ACCEPT tcp -- anywhere anywhere tcp spt:mysql
ACCEPT tcp -- anywhere anywhere tcp spt:postgres
ACCEPT tcp -- anywhere anywhere tcp spt:webcache
ACCEPT tcp -- anywhere anywhere tcp spt:8433
ACCEPT tcp -- anywhere anywhere tcp spt:us-srv
ACCEPT tcp -- anywhere anywhere tcp spts:entextxid:12100
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain fail2ban-MAIL (1 references)
target prot opt source destination
REJECT all -- vm-web.uw.ru anywhere reject-with icmp-port-unreachable
REJECT all -- 80-82-65-61.vmnode.pw anywhere reject-with icmp-port-unreachable
RETURN all -- anywhere anywhere
Chain fail2ban-SSH (1 references)
target prot opt source destination
REJECT all -- 58.218.205.66 anywhere reject-with icmp-port-unreachable
REJECT all -- 110.77.223.246 anywhere reject-with icmp-port-unreachable
REJECT all -- 58.218.205.77 anywhere reject-with icmp-port-unreachable
RETURN all -- anywhere anywhere
Chain fail2ban-VESTA (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
Chain vesta (0 references)
target prot opt source destination
Re: Extreme slow performance after changing machine ip
Ok. So I guess the firewall is ok, 8080 shouldn't be accesssed from outside.
The slow pages (60 seconds load, where queriest take just 6ms) are still a issue.
The slow pages (60 seconds load, where queriest take just 6ms) are still a issue.
Re: Extreme slow performance after changing machine ip
I stopped nginx and made httpd work on port 80. Seems to have the same issue, so the problem might reside in httpd itself or php which works as a module.
Re: Extreme slow performance after changing machine ip
Downgraded php from 5.6.9 to PHP 5.4.41, same behaviour.
Re: Extreme slow performance after changing machine ip
I'm at wits end.
It's not MySQL, Nginx, firewall,php ... what could cause this http://screenshot.vodoosolutions.com/20 ... 2_1826.png With no errors in any log.
It's not MySQL, Nginx, firewall,php ... what could cause this http://screenshot.vodoosolutions.com/20 ... 2_1826.png With no errors in any log.
Re: Extreme slow performance after changing machine ip
Here is the HAR on the slow call
{
"startedDateTime": "2015-05-22T15:24:59.593Z",
"time": 60663.44500007108,
"request": {
"method": "GET",
"url": "http://gameiki.com/search/suggestions/i ... s_global=1",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, sdch"
},
{
"name": "Host",
"value": "gameiki.com"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8,ro;q=0.6"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36"
},
{
"name": "Accept",
"value": "application/json, text/javascript, */*; q=0.01"
},
{
"name": "Referer",
"value": "http://gameiki.com/"
},
{
"name": "X-Requested-With",
"value": "XMLHttpRequest"
},
{
"name": "Cookie",
"value": "GameikiSession=hen7m202mfprtbprs5p2gp4t61; isGlobalSearch=1; _gat=1; _ga=GA1.2.1359659237.1432307189; __asc=303c387b14d7c294443f41f6edb; __auc=303c387b14d7c294443f41f6edb"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"queryString": [
{
"name": "is_global",
"value": "1"
}
],
"cookies": [
{
"name": "GameikiSession",
"value": "hen7m202mfprtbprs5p2gp4t61",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "isGlobalSearch",
"value": "1",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "_gat",
"value": "1",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "_ga",
"value": "GA1.2.1359659237.1432307189",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "__asc",
"value": "303c387b14d7c294443f41f6edb",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "__auc",
"value": "303c387b14d7c294443f41f6edb",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 656,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Date",
"value": "Fri, 22 May 2015 15:25:50 GMT"
},
{
"name": "Content-Encoding",
"value": "gzip"
},
{
"name": "Server",
"value": "nginx"
},
{
"name": "X-Powered-By",
"value": "PHP/5.4.41"
},
{
"name": "Vary",
"value": "Accept-Encoding"
},
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
},
{
"name": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"name": "Transfer-Encoding",
"value": "chunked"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Expires",
"value": "Thu, 19 Nov 1981 08:52:00 GMT"
}
],
"cookies": [],
"content": {
"size": 1806,
"mimeType": "text/html",
"compression": 1140
},
"redirectURL": "",
"headersSize": 373,
"bodySize": 666,
"_transferSize": 1039
},
"cache": {},
"timings": {
"blocked": 1.41100003384054,
"dns": 0.3410000354051601,
"connect": 159.0459999861193,
"send": 0.16799999866699977,
"wait": 60502.157000009865,
"receive": 0.3220000071814866,
"ssl": -1
},
"connection": "98931",
"pageref": "page_11"
}
{
"startedDateTime": "2015-05-22T15:24:59.593Z",
"time": 60663.44500007108,
"request": {
"method": "GET",
"url": "http://gameiki.com/search/suggestions/i ... s_global=1",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Accept-Encoding",
"value": "gzip, deflate, sdch"
},
{
"name": "Host",
"value": "gameiki.com"
},
{
"name": "Accept-Language",
"value": "en-US,en;q=0.8,ro;q=0.6"
},
{
"name": "User-Agent",
"value": "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.65 Safari/537.36"
},
{
"name": "Accept",
"value": "application/json, text/javascript, */*; q=0.01"
},
{
"name": "Referer",
"value": "http://gameiki.com/"
},
{
"name": "X-Requested-With",
"value": "XMLHttpRequest"
},
{
"name": "Cookie",
"value": "GameikiSession=hen7m202mfprtbprs5p2gp4t61; isGlobalSearch=1; _gat=1; _ga=GA1.2.1359659237.1432307189; __asc=303c387b14d7c294443f41f6edb; __auc=303c387b14d7c294443f41f6edb"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Cache-Control",
"value": "no-cache"
}
],
"queryString": [
{
"name": "is_global",
"value": "1"
}
],
"cookies": [
{
"name": "GameikiSession",
"value": "hen7m202mfprtbprs5p2gp4t61",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "isGlobalSearch",
"value": "1",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "_gat",
"value": "1",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "_ga",
"value": "GA1.2.1359659237.1432307189",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "__asc",
"value": "303c387b14d7c294443f41f6edb",
"expires": null,
"httpOnly": false,
"secure": false
},
{
"name": "__auc",
"value": "303c387b14d7c294443f41f6edb",
"expires": null,
"httpOnly": false,
"secure": false
}
],
"headersSize": 656,
"bodySize": 0
},
"response": {
"status": 200,
"statusText": "OK",
"httpVersion": "HTTP/1.1",
"headers": [
{
"name": "Pragma",
"value": "no-cache"
},
{
"name": "Date",
"value": "Fri, 22 May 2015 15:25:50 GMT"
},
{
"name": "Content-Encoding",
"value": "gzip"
},
{
"name": "Server",
"value": "nginx"
},
{
"name": "X-Powered-By",
"value": "PHP/5.4.41"
},
{
"name": "Vary",
"value": "Accept-Encoding"
},
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
},
{
"name": "Cache-Control",
"value": "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
},
{
"name": "Transfer-Encoding",
"value": "chunked"
},
{
"name": "Connection",
"value": "keep-alive"
},
{
"name": "Expires",
"value": "Thu, 19 Nov 1981 08:52:00 GMT"
}
],
"cookies": [],
"content": {
"size": 1806,
"mimeType": "text/html",
"compression": 1140
},
"redirectURL": "",
"headersSize": 373,
"bodySize": 666,
"_transferSize": 1039
},
"cache": {},
"timings": {
"blocked": 1.41100003384054,
"dns": 0.3410000354051601,
"connect": 159.0459999861193,
"send": 0.16799999866699977,
"wait": 60502.157000009865,
"receive": 0.3220000071814866,
"ssl": -1
},
"connection": "98931",
"pageref": "page_11"
}