VPS Incredibly Slow, Huge Numbers Of Slow MySQL Queries For Plesk/Watchdog
Nov 11, 2008
I've got 25 domains on a Virtuozzo/Plesk8.6/CentOS5 VPS. Each domain has one up-to-date install of WordPress, most have very little traffic (average 200mb per month), maybe 2 domains get 5-7gb traffic per month.
I monitor port 80 connections and rarely see more than 10 at a time.
That should in my opinion be no problem at all for a VPS with 768mb guaranteed ram and 2.4ghz cpu. I've got 30gb hard drive spare too.
But.... about 8 or 10 times a day it grinds to a complete halt: server load at 500-1000%, sites timing out, plesk takes 3mins to load, often I can't even connect with SSH, and the plesk web server, apache
80 seconds sounds like a huge amount of time for a MySQL insert to me! Does anyone know if this is likely to be the cause of my trouble? Some problem with Plesk and the database? Or could it be something else?
What I did here was create /var/log/mysqld.slow.log for queries that are taking one second or longer. After around 36 hours, here is what I came up with. Since the file size of /var/log/mysqld.slow.log was 219KB, posting it in its entirety it not practical. Therefore, I used a program, the perl script known as mysql_slow_log_parser found on www.retards.org, to parse the mysqld.slow.log to make it easier to interpret and read. The result was that the original filesize of 219KB was converted to the smaller size of 14KB....
I have windows server 2012 and Plesk v12.0.18 #30 - I noticed speed problem.
When I try to connect to mySQL with:
$conn = new mysqli('localhost', 'joomla_***', '*****', 'joomla_test');
Connection takes 1 second!!!When I try to connect with '127.0.0.1' instead of 'localhost' connection takes 0,009 seconds.
1. I tried solution to add line '127.0.0.1 localhost' to c:windowssystem32driversetshosts - but no luck.
2. I tried to edit C:Program Files (x86)ParallelsPleskMySQLDatamy.ini - adding lines bind-address=127.0.0.1 skip-name-resolve then restarted mySql but 1 second lag time on connection was still there.
3. I even tried to disable IPv6 but still no luck
I guess all users windows windows server 2012 has the same problem??!?!...
I'm running a forum system on my server. Loading pages that don't connect to the forum database load normal. Whenever I browse any page that connects to the forum database on my forum, the page either takes ages to load or times out loading. I never exceed using 14% of one of my two cores, I'm using a quarter of my 1.5GB ram. It's only been loading slow like this since I've switched from running Windows to Ubuntu Server 8.10. I enabled logging slow queries on SQL, but nothing's been recorded. I've installed the server packages through Webmin,
when I access the server through its local IP address it's still very slow.
At the PHP level, we have the following in our php.ini (some of these were recommended in our documentation to start with):
max_execution_time = 300 memory_limit = 128M error_reporting = 2039 display_errors = Off register_globals = Off
/etc/my.cnf
[mysqld] local-infile=0 datadir=/var/lib/mysql skip-locking skip-innodb skip-networking safe-show-database query_cache_limit=1M query_cache_size=32M ## 32MB for every 1GB of RAM query_cache_type=1 max_user_connections=500 max_connections=1500 interactive_timeout=10 wait_timeout=28800 connect_timeout=20 thread_cache_size=128 key_buffer=512M ## 128MB for every 1GB of RAM join_buffer=4M max_connect_errors=20 max_allowed_packet=16M table_cache=1024 record_buffer=4M sort_buffer_size=4M ## 1MB for every 1GB of RAM read_buffer_size=4M ## 1MB for every 1GB of RAM read_rnd_buffer_size=4M ## 1MB for every 1GB of RAM thread_concurrency=8 ## Number of CPUs x 2 myisam_sort_buffer_size=64M server-id=1 collation-server=latin1_general_ci
We have a dedicated server and we host 4 news portals based on e107 and joomla.
My partner on Sunday has upgraded mysql from version 4 to 5. Now the server experiences very high CPU usage and query time on portals has been increased very much.
We used to have query times lower than 1 sec for the main page of [url](which is a site that receives about 2000 visits/day) and now query times are 5-15sec !
Does anybody know if this is makes sense ?
Below is the server Status from WHM : -------------------------------------
cpdavd up cpsrvd up exim (exim-4.69-15.1_cpanel_maildir) up ftpd up httpd (2.2.11 (Unix)) up imap up interval up mysql (5.0.67-community-log) up named (9.3.4) up pop up rsyslogd up spamd up syslogd up Server Load 6.97 (1 cpu) Memory Used 49.4 % Swap Used 0.23 % Disk /dev/hda3 (/tmp) DMA+ 70 % Disk /dev/hda5 (/) DMA+ 22 % Disk /dev/hda1 (/boot) DMA+ 14 %
Below is the Server Information from WHM : ------------------------------------------ Processor #1 Vendor: GenuineIntel Processor #1 Name: Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz Processor #1 speed: 2394.068 MHz Processor #1 cache size: 2048 KB
I'm hosting about 6 private websites on my server, and some have problems.
My biggest website is a vb forum with 30.000 members and 1.5 million posts.
When i browse with firefox i see that vb forum loads fast, but phpads which is integrated on the top and footer loads very slow. When i browse with IE, it takes like 10 seconds before the whole site is loaded and sometimes IE even crashes.
When i try to login on another website / admin panel (oscommerce), i get a mysql gone away error, that means timeout. But why does it show that? I ran mysqlreport and can't find anything why it should display mysql gone away. # ./mysqlreport MySQL 5.0.15-standard uptime 3 19:36:47 Mon Feb 5 11:08:10 2007
__ Key _________________________________________________________________ Buffer usage 78.94M of 96.00M %Used: 82.23 Write ratio 0.60 Read ratio 0.00
We have a problem with a Plesk backup. We have about 300 domains, the scheduled task starts 23.30 and takes about 16 hours and thats not normal. Before it took about 9-10 hours for 'All configuration and content' and that was too long, so we set up for 'All configuration and content except mail'. It worked for a few days and then it started to take 14 - 16 hours for a server backup. We use Plesk 11.5 on CentOS 6 64bit.
OS CentOS 6.5 (Final) Plesk version 12.0.18 Update #6, last updated at July 2, 2014 11:13 AM
The system is up-to-date; last checked at June 27, 2014 04:43 AM
All current websites on the server seem to work fine any new subscriptions we cannot get working at all.
We can connect via FTP to new sites SOMETIMES - just cant get directory listing. When we can connect and get into a directory it slows down.
In Active mode: Command:MLSD Response:425 Unable to build data connection: Connection refused Error:Failed to retrieve directory listing Install Wordpress via the Parallels panel it loads and says it is all there, just can't log or display any pages. The default Parallels page is displayed.
Upload a html page via the File Manager in Parallels and it displays the default Parallels page.
Unpack the Wordpress tar file via File Manager and it displays the default Parallels page.
The Wordpress feature in Parallels says it is working fine, can't display any page, can't log in as it returns a 404 page or the default Parallels page.
Create a site in Presence builder and Parallels says there is a site. The default Parallels page is displayed when opening the site.
Go to DOMAINS and there is 0mb in space used and there are files listed in the File Manager - none of which can be displayed.
After upgrading to Plesk 12 the FTP connection has become very slow. Mode Security, Fail2Ban and Plesk Firewall have been enabled, the security is set to force sFTP and maximum security and in /etc/proftpd.d/ a conf file has been added to set the passive ports that have been opened in the Plesk Firewall (60000 to 62000)
Turning off the Mod Security does not solve the slow connection.
What can we do to detect the cause of the problem?
I've been having a few issues with the control panel navigation is running slow even though I have heaps of resources available and free. The server is located locally and have no problems surfing websites attached to the same server.
When I login as admin, it can take 25 seconds to load into the first screen.
CPU GenuineIntel, Intel(R) Xeon(R)CPU E5649 @ 2.53GHz Version Parallels Plesk v12.0.18_build1200140606.15 os_CentOS 6 OS CentOS 6.6 (Final) Memory Available 6GB used 2.5-3GB HDD: 300GB/ approx 130GB Free
I have tried issuing a /etc/init.d/psa restart command and has made no difference.
We are seeing intermittent slow responses from SMTP on a RHEL6 server running Qmail on Plesk 11.5. The response is being measured from a remote Zabbix server.
The response time seems to be slow (>10s) for a period of 2-3 minutes and then returns to normal (<1s). All other services continue to be ok during the period of slowness.
The server_args line in /etc/xinetd.d/smtp_psa already contains "-Rt0" and all the DNS servers in /etc/resolv.conf are resolving properly.
From looking at the maillog file the server was receiving about 35 SMTP connections a minute at the time of the slowdown. We have the server configured to use 2 x RBL's.
I wonder if we are hitting a limit on the maximum amount of SMTP connections. The file /var/qmail/control/concurrencyincoming does not exist so, according to the Qmail manual, there shouldn't be a limit on the number of incoming SMTP connections.
In the last few days the responses from Plesk's XML API have been extremely slow. It's now taking an average of 45 seconds to handle an XML API request where it used to be more around 5 seconds. What would cause that? What service handles these requests on the server so I can try rebooting it?
where to search. It appear thaht my free memory decrease each minute after reboot.When i restart it's ok but i see minute after minute the free memory is decreasing...
The command top don't show special process which explain my problem. I don't understand how a process can kill my memory but not immediatly but from reboot to after 4 or 5 hours uptime.
I have an old laptop with the following specification: Memory: 485 MiB, Processor: Genuine intel CPU T2300 @ 1.66 GHz ×2, OS Type: 32 bit, Disk: 78.1 GB,
I installed on it Ubuntu 12.04 LTS and I noticed that the overall system is very slow in responding. I tried to search about that in the internet and I found some articles talking about how to make Ubuntu 12.04 LTS run fast I applied all what they said including download LXDE desktop environment and then nothing different in the system response time.
Then I need to develop some android applications so, I download Android Studio (Beta) 0.8.6. The problem became worse than before whenever I tried to open the Android Studio the screen is frozen for some minutes then it took time to download the projects and initialize the work space also, when I tried to move the cursor he is move very slowly. When I tried to run my first application on the AVD it took three hours and still not run yet.
I delete the Android Studio and install it again several times, I was trying to solve the problem but still nothing change.
I`ve got a problem with plesk when hosting Wordpress, when using Wordpress navigating between the pages (front-end and back-end) server time seems to be 15 sec.I`ve checked CPU usage and that stays under 5%.
When I install Drupal or Concrete5 or any other application that uses PHP with MYSQL it runs very fast.I`ve already fine-tuned PHP / Apache2 / Nginx & Mysql to get the max possible performance out of it.
What i`m using for hardware: i7 920 2.6Ghz 24GB Ram LSI Raid controller 9260-8i RAID 10, 6 WD Black disks (internal speed goes about 450mb/sec) RAID 1, 2 x Samsung SSD Evo 840
Software: ESXI 5.5, optimised for maximum performance. (no standard config) PLESK VM has 8 cores, 16GB Ram and I/O access priority set to max.
If I move the PLESK VM to the SSD datastore it makes no difference.Again, the problem only happens when i`m installing Wordpress..I Also did a manual install of Wordpress, same issue..I`m going to try the older version of Wordpress (3.9) so see i`m having the same problems..Using the latest plesk 12 on Ubuntu 14 with trail license at the moment.
Today, without any change on the server side my single running website on my server started running low. After checking the running processes I realised I have these 8 processes running with high cpu load something that didn't had before.
4245 user 20 0 283m 103m 10m R 85.1 0.3 6:44.88 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini 4243 user 20 0 241m 68m 8736 R 83.8 0.2 6:33.45 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini 4259 user 20 0 254m 82m 8720 R 83.5 0.3 6:11.00 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini 4244 user 20 0 282m 103m 10m R 82.1 0.3 6:46.49 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini 4247 user 20 0 248m 76m 8712 R 78.8 0.2 6:50.31 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini 4264 user 20 0 258m 85m 8712 R 72.9 0.3 6:49.83 /usr/bin/php-cgi -c /var/www/vhosts/system/domain/etc/php.ini
apache error log doesn't show any warnings, errors.
We have more than 10 domains on the same webspace, sharing the same document root. When we try to add a new domain on the same web space (sharing the same document root) Plesk takes a long time to create it (about 10 minutes). While domain creation, all the other domains sharing the same document root and web space get an authentication error. When Plesk finishes, all domains work again.
I'm currently hosting all of my stuff with my own Wild West Reselling Account, i.e., InnoDomains.com.
Problem is I'm running multiple Wordpress Installations and a few websites that have some pretty intense MySQL work going on in the background, and I use about 250GB per month in bandwidth.
My Account gets the 503 downtime errors because according to Customer Service I cannot run more than 50 MySQL queries in one second. Well, that's not much of a challenge because a lengthy wordpress page runs about 90 queries and loads in 2-3 seconds. Time this by three including the other websites and a couple of shopping stores, and I'm easily doing more than 100-150 queries a second more than several times a day, thereby seeing that nasty, irritating error.
My other option is to split up all the websites over basic $ 3.95 per month accounts. I don't want to switch to a dedicated server yet because I'm not really making a whole lot of money (about $ 30 per month). Another thing I could do is move my MySQL testing to a local machine, and that may actually reduce the load on the damn server.
Are there any hosts out there that will allow me to do more than 100 MySQL queries per second? If so, are there any that are any good?
This has happened twice now. I have my wait_timeout variable set to 60 seconds, but occasionally my database gets overloaded with "locked" queries. Here's an example of my processlist:
This continues on with locked queries all the way up to my limit of 450 connections, then the whole server goes down. Note the time spent processing these queries, 35483 seconds and counting! Surely the wait_timeout is supposed to prevent this from happening?!
Also, this appears to start with queries in the State "statistics". Then the State for the following queries becomes "locked". Does anyone know what these mean? Can I get them to timeout normally? Queries which never timeout are guaranteed to bring your server down eventually, surely this is not the desired behaviour.
I've been pondering something for a long time here, but never really knew the right question to ask, or how to word it... so I never even know what to search for. So I honestly have no idea what I'm asking or if this is even under the right topic. What I'm looking for is answers, links, tutorials, or just some words I can search for to help me do the following:
I have a MySQL database filled with accounts. People have to pay to get these accounts. All the accounts are set to expire on different days. I need to send an e-mail out to accounts, for example, to let them know they're expiring, say, a month before this will occur. Right now the only way I know to do this is to have MySQL queries on a PHP page that, every time the page is loaded, runs through all the accounts, checks their expirations, and sends emails to those that need it. I know there has to be a way to have this happen automatically without having to load a PHP page every day, for example.
I know about the general log but want to just log queries of a specific user. Our database does 400 queries/s on a slow day, so I think it would be a pain to grep though a huge log like that. And, im not sure if it would cause any preformance issues.