Re: The problem is that due to high number of connections sometimes, especially when there are more than 4000 users online, this message appears: ‘Can't connect to MySQL server on '192.168.1.1' (99)
Posted by: Rick James
Date: December 10, 2015 04:11PM

4K qps - Nice.

Are you using only MyISAM? If so,
* Lower innodb_buffer_pool_size to free up some RAM
* Decrease key_buffer_size -- you are currently allocating more space for caching indexes (the key_buffer) than for the data. Presumably the data is bulkier.

You have a huge query_cache. Do you experience stalls in performance? Every time a table is modified, _all_ the entiries for that table are removed from the QC. With such a large QC, that takes a long time. Recommend no more than 60M for query_cache_size.

thread_stack = 393216 -- Why? 18000*393216 = 7G. Shrinking that to the default would free up space for caches.

max_connections = 18000 -- Very risky. If you hit that, or even come close, you will probably run out of RAM and start swapping. This will make the system seem even worse.

Did you use pt-query-digest to summarize the slowlog? What is the current 'worst' query? (I don't mean "slowest"; the metric to use is sum(query_time*count).)

mysql_connect -- You really need to move to the mysqli_* (or PDO) interface. mysql_* is being removed in the next(?) PHP version.

There are a number of metrics I would like to see in SHOW GLOBAL STATUS. Please provide that, and I will continue this discussion. Max_used_connections is the first one that comes to mind.

I won't necessarily point you toward pconnect. (I have not had much luck with that.) Have you looked at readonly Slaves? Galera Cluster? InnoDB?

Options: ReplyQuote


Subject
Written By
Posted
Re: The problem is that due to high number of connections sometimes, especially when there are more than 4000 users online, this message appears: ‘Can't connect to MySQL server on '192.168.1.1' (99)
December 10, 2015 04:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.