MySQL Forums
Forum List  »  Performance

Re: "Can't create tcp/ip socket (24)" warning message
Posted by: Rick James
Date: March 29, 2010 09:34PM

I have seen a machine with Max_used_connections over 4800; it was a Linux 2.6 box. This confirms (to some extent) that you should be able to get past 1000.

Suggest you set thread_cache_size = 50, and monitor Connections/Uptime -- if there are more than a few per second, then thread_cache_size should be raised.

If a 'vote' really does get in and out in 30ms, then 1000 connections can handle 33K votes per second. I suspect you will meltdown for other reasons at that scale. Do you really think all 10K participants will hit Send in the same second?

Are your 'votes' coming through a web server? How many requests per second can it handle. I suspect only a few hundred. Even with multiple threads (eg Apache and its MaxClients).

There are not many retry mechanisms. Usually you get "connection denied", and have to retry yourself.

PHP has "pconnect"; this is probably useful for you. max_connections needs to be slightly more than MaxClients * (number of web servers).

Do not set MaxClients so high that the web servers are CPU (or disk) bound; then the threads will simply stumble over each other.

I cannot predict whether MyISAM or InnoDB would handle the flood of inserts better. Each has issues. Also, do you check to see if the user has already voted? (Consider INSERT ... ON DUPLICATE KEY UPDATE ...) Could you show me the schema (SHOW CREATE TABLE) and the INSERT/UPDATE/whatever statement. This would lead to a discussion of the necessary table or row locks you will encounter.

Options: ReplyQuote

Written By
Re: "Can't create tcp/ip socket (24)" warning message
March 29, 2010 09:34PM

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.