Mysql Connections Topping Out Within Seconds
May 13, 2009
i have a small cluster (one web and one db) setup and i host a rather popular group of 4-5 sites that allow users to dynamicly create their own mobile chat communitys automaticly. each site gets its own mysql db created and populated automaticly.
this is all fine,
but in the last 24hours weird things have begun happening, previously i had the sql max_connections set to 500 and this was perfectly adquate for the demand but now even when i set the connection to 4000+ they are all maxxed out within 5-10 minutes, and mysql processlist shows thousands of unauthenticated user connections sitting at login status,
i have gone through the sites and all their mysql configs are fine so i cant see what the issue is.
server specs below
db server:
dual amd opteron 246
8GB ram
120gb hd(64gb free)
33gb swap (rarly used but their for emergencys)
centos 5 64bit.
direct 100mbit lan to web serv
only mysql,ssh and webmin running, no other apps installed
web server:
amd athlon 64 3800+
plesk 9.2.1
4gb ram
2x120gb hds
apache status onthe web server only shows 120ish http connections but the sql keeps climbing
View 8 Replies
ADVERTISEMENT
Jan 16, 2008
My PHP application is starting to reach max mysql server user connections limit (currently set to 60). I listed mysql process list in phpmyadmin and found there lot of queries with status "LOCKED" these hang there for a long time(not always just sometimes - twice a day) and then connection limit is reached. It causes load average about 40 for as long as 10 - 20 minutes
I think it may be bacause of query structure. There are some queries with many inner joins...
Here is typical situation from phpmyadmin's process list:
1. select ... from table_1
inner join table_2
inner join table_3
inner join table_4
inner join table_5
This show status : "Copying to tmp table" in phpmyadmin
2. update table_2 set ....
This shows status: Locked
3. select ... from table_2
This shows status: Locked
Seems then when temp table is being created the table_2 is locked and it cannot make update to table_2. or maybe it's locked because of just that update on table_2.
I want to avoid of creating temp tables... Can it help if I'll make separate selects without large table joins ?
View 3 Replies
View Related
Jan 7, 2007
I'm currently using MySQL 4.1.12 for Windows 2003, and I need to know how much possible connections can MySQL achieve? I'm currently around 650. I'm having 4 new servers online, and that will bring my total concurrent connections to 1000+.
how high it can go?
View 3 Replies
View Related
May 24, 2007
I notice that most hosting have limit of mySQL connections.
If the max mySQL connections is 50 and I run a forum on this hosting,about how many people can visit my website at one time?
View 3 Replies
View Related
Feb 18, 2007
from what I view, wait_timeout is used for disconnecting connections. However, it applies to tcp/ip connection only. So, in my database connection, if I am using mysql server as localhost, that variable is not applied? In that case, how can I close connections automatically after xxx seconds?
View 8 Replies
View Related
Oct 21, 2009
unfortunately my server crashes a lot recently. What happens is that some application creates a MySQL connection which hangs and then MySQL gets overloaded and takes the whole server down.
My question:
1. How do I configure MySQL to time out even on active connections ? I.e. after 30 seconds kill the process no matter if it is still active or not. Is that possible ?
2. How do I exclude the root user from that?
View 1 Replies
View Related
Dec 17, 2008
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:
Code:
| 14773848 | db_name | localhost | db_name | Query | 35483 | statistics | SELECT COUNT... |
| 14776290 | db_name | localhost | db_name | Query | 35144 | statistics | SELECT COUNT... |
| 14778877 | db_name | localhost | db_name | Query | 34841 | statistics | SELECT COUNT... |
| 14790744 | db_name | localhost | db_name | Query | 33056 | Locked | UPDATE... |
| 14791275 | db_name | localhost | db_name | Query | 32977 | Locked | SELECT... |
| 14791395 | db_name | localhost | db_name | Query | 32960 | Locked | SELECT... |
| 14791556 | db_name | localhost | db_name | Query | 32929 | Locked | SELECT... |
| 14791603 | db_name | localhost | db_name | Query | 32924 | Locked | SELECT... |
| 14791757 | db_name | localhost | db_name | Query | 32900 | Locked | SELECT... |
| 14792209 | db_name | localhost | db_name | Query | 32815 | Locked | SELECT... |
| 14792355 | db_name | localhost | db_name | Query | 32786 | Locked | SELECT... |
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.
View 4 Replies
View Related
Aug 12, 2008
for a linux web host that has extremely fast mysql connections, 100GB of bandwidth, and the amount of space has to be at least 1GB. Price doesn't really matter.
View 8 Replies
View Related
Apr 3, 2008
Recently I've upgraded my MySQL server. I connect to it via a conection from NIC to NIC (Internal IP addresses). Since the upgrade/format, I've managed to get everything back to the way it was. Everything works fine for 15-20 minutes. Then the PHP server can no longer access the MySQL server.
I tried logging in from the PHP server, I get access denied. I then tried logging in locally, on the MySQL server and I get in fine...
It's not like it's a firewall issue though, it's strange...
I tried updating PHP/MySQL to a few releases, even the RC's to no avail...
Something to note is that when I try restarting MySQL it can take 4-5 minutes, sometimes not even complete.
View 2 Replies
View Related
Jun 22, 2007
how i can limit http and mysql connection limit on per domain basis.
View 2 Replies
View Related
Mar 26, 2007
to set up a serious of scheduled tasks. For example at 9:35:12 PM I would need a php script to run. And its very important that it run at the 12 second mark for the 35th minute. This seems like an application for a cronjob. Anyway, it looks like you can only have cronjobs run every minute, not seconds.
View 1 Replies
View Related
Feb 13, 2007
Today, I put a new server on our racks.
Problem: the machine crashes exactly every 10 minutes. The crash occurs with no entry on the logs and with 0.00 load. It is as if someone take out the current every 10 minutes.
Here are the specs:
- 2 CPU Intel Xeon 2.0
- 8 Gb RAM ECC
- 2 x 250 Gb HDs
This machine needs plenty of current. I wonder if I am not going over the rack power quota. May be there is a system to allow overages for then 10 minutes, then it cut back the current to the rack quota.
View 2 Replies
View Related
Jan 10, 2008
My log is filling up with errors + 500 internal displaying:
2008-01-09 16:17:50: (mod_fastcgi.c.2703) fcgi-server re-enabled: unix:/tmp/php-fastcgi.socket-1
2008-01-09 16:17:59: (mod_fastcgi.c.1731) connect failed: Connection refused on unix:/tmp/php-fastcgi.socket-1
2008-01-09 16:17:59: (mod_fastcgi.c.2885) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 5
2008-01-09 16:18:05: (mod_fastcgi.c.2703) fcgi-server re-enabled: unix:/tmp/php-fastcgi.socket-1
2008-01-09 16:18:18: (mod_fastcgi.c.1731) connect failed: Connection refused on unix:/tmp/php-fastcgi.socket-1
2008-01-09 16:18:18: (mod_fastcgi.c.2885) backend died; we'll disable it for 5 seconds and send the request to another backend instead: reconnects: 0 load: 5
2008-01-09 16:18:24: (mod_fastcgi.c.2703) fcgi-server re-enabled: unix:/tmp/php-fastcgi.socket-1
2008-01-09 16:18:33: (mod_fastcgi.c.1731) connect failed: Connection refused on unix:/tmp/php-fastcgi.socket-1
I have tried all sorts of combos.
Core2Duo 1 processor
Lighttpd 1.4.18
PHP 5.2.5
xcache 1.2.1
2gig ram
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/tmp/php-fastcgi.socket",
"bin-path" => "/usr/local/php5/bin/php-cgi",
"min-procs" => 2,
"max-procs" => 6,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "10",
"PHP_FCGI_MAX_REQUESTS" => "1000"
)
)
)
View 13 Replies
View Related
Mar 27, 2009
I have an apache server on windows which I wanted to speed up using caching systems.
I tried installing squid, and I got it working with a basic example config. It seemed to work well, however under more heavy load I experienced some weird behaviour where network output is 0 for several seconds at the time, and all clients just hang in the wind and wait for a respons.
Remote to the server is working fine, so it's definitely a squid issue.. with only apache running the server is constantly sending out data, no halts there.
Any hints on what errors I should be looking for?
View 1 Replies
View Related
Oct 17, 2013
My site will wait for 30s almost everytime before loading any of the page itself.Specs of my install:
- DigitalOcean Droplet (VPS) with Ubuntu Server 12.10: 512 Ram and 20GB SSD (not even coming close to needing more RAM, still have 240MB free according to top)
- Wordpress 3.6.1
- 5 plugins: W3 Total Cache, Wordpress SEO by yoast, WP Better Security, WP Smush.it, and Redirection (problem occured before adding the last 2, I can't remember about the others)
- No traffic to speak of. I get maybe 10 uniques/day.
- Apache 2.2.22
- MySQL 5.5.32
I've optimized my site itself the best I can, minifying and combine js and css files, using the WP Smush. It plugin to compress images, serving jQuery from a CDN, but none of that worked the 30 second wait (though it did shave about 10 seconds off the load time after the wait for response).
I was using cloudflare and had to fiddle with the nameservers of my domain, but cloudflare didn't work at all and I switched the nameservers back to normal pointing DNS directly at my site to eliminate the obvious causes. I'm comfortable with Linux and the command line. This is the link to my site: [URL] ....
View 3 Replies
View Related
Jun 7, 2015
I have installed NGINX + PHP-FPM + PHP5Memcached + Memcached + APC on my VServer. My Problem is Page loading time of around 40-60 seconds. Installed is 12.0.18 Update #49
[URL] .....
Connection Setup: TIME
Stalled: 1.860 ms
Request/Response
TIME
Request sent: 0.214 ms
Waiting (TTFB): 47.08 s
Content Download: 41.757 ms
Explanation 47.12
I have reconfigured the Domains but nothing changed and Bootstrap Repair
Code:
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair
If I disable Nginx and use "Apache Module" for PHP than the TTFB time is shorter but is not the prefered way. If I use "CGI" or "FASTCGI" without Nginx than the Page loading time is a little bit shorter but with Erros on the Website.
I tried to reinstall Nginx from Plesk but this gave me Error after enable it
root@vserver:/# /usr/local/psa/admin/sbin/nginxmng -e
[2015-06-08 00:26:12] ERR [util_exec] proc_close() failed
...
[2015-06-08 00:26:13] ERR [util_exec] proc_close() failed
[2015-06-08 00:26:15] ERR [panel] Apache config (14337159720.96731500) generation failed: Template_Exception: Destination directory '/etc/nginx/plesk.conf.d/vhosts' not exist
file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
Destination directory '/etc/nginx/plesk.conf.d/vhosts' not existClick to expand...
View 3 Replies
View Related
Dec 17, 2007
Since moving servers I've been plagued by constant disconnects whilst using FTP:
421 No transfer timeout (300 seconds): closing control connection
I've gone through Proftpd's forum and documentation numerous times to try and find a solution to this but have been unsuccessful so far.
Within proftpd's config file it's set at:
TimeoutLogin 120
TimeoutIdle 3600
TimeoutNoTransfer 3600
TimeoutStalled 3600
So I am unsure where it is getting the "300 seconds" from.
Even though the error states 300 seconds, this problem happens way before 300 seconds every time and has happened during the transfer of files (when the connection has been active and in use).
I've tried 3 different FTP clients and used the "Keep Alive" option in each and it has absolutely no effect.
I am unsure if APF is causing the problem, I can't see any problems in any of the server logs in relation to ftp.
View 5 Replies
View Related
Feb 5, 2007
while i am restoring db (110MB) via SSH following error occur
Code:
ERROR 1064 (42000) at line 145689: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
Fatal error: Maximum execution time of 30 seconds exceeded in ' at line 1
View 12 Replies
View Related
Oct 24, 2014
It seems that since my latest update of 12.0.18. Now everytime I login to the Admin interface of plesk. I am prompted to relogin several times when browsing using file manager or clicking on domains or sitting idle for like 15 seconds.
It can do this up to 5 times in a 5 minute period or while not even being idle.
View 9 Replies
View Related
May 8, 2009
Since my /var partition is full, so I moved /var/lib/mysql to /backup/mysql/.
Seems all the files are copied and I changed my.cnf reboot mysql, but all the web sites using db is not working anymore..
View 4 Replies
View Related
Dec 22, 2008
Sometimes my server surcharge load average increase at 60 , and all my configuration are OK
when i type :
netstat -plan|grep :80|awk {'print $5'}|cut -d: -f 1|sort|uniq -c|sort -nk 1
i have : ...
View 8 Replies
View Related
Dec 21, 2008
I tried to update a plugin at my blog its a wordpress blog, as soon as the update was started that site on the server stopped working, (later on i closed the upgradation window), after few minutes website start working automatically, Now in my opinion I think that update process is still running in background thats why connections are creating continuously to that website IP.
[root@server ~]# netstat -alpn | grep :80 | awk '{print $4}' | cut -d: -f1 |sort |uniq -c
1001 serverIPhere
its even touching 1500, I tried to contact my server support but unfortunately they can investigate the issue, instead they told me to check with the following command.
netstat -plan |grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c
which is not an answer to my question. Can anybody please tell me why those connections are making to that website's IP? I don't think its a Ddos attack, because it was just started when i updated the plugin.
View 10 Replies
View Related
May 19, 2008
Could someone comment on the kind of load a VPS service can handle? If I were to run an HTTP server how many connection/sec would be realistic.
View 3 Replies
View Related
Mar 6, 2007
How many simulteanous connections to the site do alot of webhosting company usually allow with shared hosting packages. I was wondering because4 some companies say pay $$ a month get 300gb of bandwith a month. Can they limit the bandwith by limiting your simulteanous connections? I am asking because I just found out my host only allows 50 per hosting package that is on a shared server. To me that seems to be very little.
View 1 Replies
View Related
Apr 19, 2007
WARNING: One or more of your DNS servers does not accept TCP connections. Although rarely used, TCP connections are occasionally used instead of UDP connections. When firewalls block the TCP DNS connections, it can cause hard-to-diagnose problems. The problem servers are:
Error [No response to TCP packets].
APF is installed on the server, how do I allow TCP DNS connections? I already added port 53 to ingress/egress for TCP and UDP.
View 7 Replies
View Related
Dec 20, 2007
I run this a few times a day:
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
and get outputs like (just the bottom here, IPs removed):
8 IP #1
8 IP #2
8 . . .etc
8
9
9
9
9
9
10
10
11
12
13
14
15
18
19
25
26
32
32
91
The server runs gallery2, how many connections does an IP need just to browse the gallery? I'd like to block wget etc, but don't want to hurt search engine optimization (SEO). Is there a compromise, like limiting IPs to 5 connections, so the site still gets crawled, just slower?
DDoS deflate is installed: [url]
which permabans IPs with 150+ connections
Also what are the commands to block and unblock these IPs,
View 2 Replies
View Related