Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When I strace my MySQL process, I keep finding the same error over and over:

setsockopt(240, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
futex(0x87ab944, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x87ab940, {FUTEX_OP_SET, 0,         FUTEX_OP_CMP_GT, 1}) = 1
futex(0x87ab260, FUTEX_WAKE_PRIVATE, 1) = 1
select(13, [10 12], NULL, NULL, NULL)   = 1 (in [12])
fcntl64(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
accept(12, {sa_family=AF_FILE, path="\246\32629iE"...}, [2]) = 803
fcntl64(12, F_SETFL, O_RDWR)            = 0
getsockname(803, {sa_family=AF_FILE, path="/var/lib/mysql\1"...}, [28]) = 0
fcntl64(803, F_SETFL, O_RDONLY)         = 0
fcntl64(803, F_GETFL)                   = 0x2 (flags O_RDWR)
fcntl64(803, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(803, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
futex(0x87ab944, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x87ab940, {FUTEX_OP_SET, 0,     FUTEX_OP_CMP_GT, 1}) = 1
futex(0x87ab260, FUTEX_WAKE_PRIVATE, 1) = 1
select(13, [10 12], NULL, NULL, NULL)   = 1 (in [12])
fcntl64(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
accept(12, {sa_family=AF_FILE, path="\246\32629iE"...}, [2]) = 240
fcntl64(12, F_SETFL, O_RDWR)            = 0
getsockname(240, {sa_family=AF_FILE, path="/var/lib/mysql\1"...}, [28]) = 0
fcntl64(240, F_SETFL, O_RDONLY)         = 0
fcntl64(240, F_GETFL)                   = 0x2 (flags O_RDWR)
fcntl64(240, F_SETFL, O_RDWR|O_NONBLOCK) = 0
setsockopt(240, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)

When I look for running mysql processes I don't see anything out of the ordinary.

I figured it might be someplace in my code, so I modified .htaccess to spit out a 502 error to prevent it from loading anything. The error still shows up, just less frequently.

There have been quite a few threads that talk about this error, but no real answer as to how to solve it.

my.conf, as per request:

#local-infile = 0

log-slow-queries = /var/log/mysql-slow.log
max_connections = 200
query_cache_limit = 128643200
key_buffer_size = 1200144000
low_priority_updates = 1
concurrent_insert = 2
thread_cache_size = 7
query_cache_size = 662144000
table_cache = 1600
table_definition_cache = 1024
long_query_time = 2.5
open_files_limit = 2647
share|improve this question
MySQL is trying to set Quality of Service flags. Are you using a unix socket or an IP socket? Can you post your my.cnf for us? –  Jeff Ferland Mar 27 '12 at 20:45
@JeffFerland, the my.cnf has just been added. As for your unix socket or IP socket question. I have no idea. :( –  brant Mar 27 '12 at 21:06
Why would anyone try to solve this error? What purpose would QoS serve on a local connection? –  David Schwartz Mar 28 '12 at 2:44
@DavidSchwartz I was under the impression that something was broken and this trace was where things stopped... why else produce an strace? Anyway, going on to explain that an ERRNO return isn't always a failure... –  Jeff Ferland Mar 28 '12 at 3:30
+1 vote to this question to balance the negatives because a) the asker found a similar thing all over the place, b) I couldn't find any answer while searching. I don't think it should be voted up and the wrong thing was asked, but it shows effort that doesn't deserve penalty. –  Jeff Ferland Mar 28 '12 at 5:18

2 Answers 2

up vote 3 down vote accepted

It was my original assumption that you were posting this because it was causing a complete failure. Understanding now that it is not a failure, I'm going to explain why this is ok.

As David said, IP_TOS is a call to set the Type of Service for the Quality of Service provision. The local connection (which your my.cnf shows you must be using) doesn't support that.

When writing code in C, a system call almost always returns 0 on success or another number, usually mapped to a constant. Receiving such an error code does not mean a failure occurred. For example, I could quickly check for a file by calling stat on it, and if it were there I would get certain results back. If it weren't there or directory permissions didn't let me see the listing, I'd get an error code. That doesn't mean that my application failed. Whether I mean for that file to be there or not is my interpretation of the code.

Similarly, MySQL isn't intrinsically failing because it caught a code. It doesn't go through a process of checking various things, it just sets the TOS and forgets it. MySQL doesn't care if that doesn't work and probably doesn't even catch the flag. It's not worth the execution branch to check if we can or check if it worked.

Thus, since it's not terminal and not the result of a few retries on the way to getting things to work, it's not part of any problem.

I implied that your problem was nothing returning at all and was expecting to diagnose some bug in MySQL. When you post a question, you should explain what is wrong. When you go through debugging steps and you don't say why, I assume that what you'er showing is where things died. It seems you've made an error from nothing. I suggest you start a new question and tell us why you're hear and what the actual problem you're trying to cure is rather than an apparent symptom that you've zeroed in on.

share|improve this answer
Thanks for the thorough response Jeff. If I had to reputation to mark your answer as correct, I would. Sorry I could not be more specific. I assumed this was some type of response error by MySQL based on what I've found elsewhere: cpanel, cpanel2, cpanel3. I'll take your guys word for it that it is nothing to worry about. –  brant Mar 28 '12 at 4:29

This is all normal connection accepting behavior. Nothing indicates a problem. If you look closely, you'll see the server calls select to find out what to do, discovers a connection it can accept and does so.

For each connection it accepts, it goes through a configuration process including setting the connection non-blocking. One of the things it tries to do is set QoS parameters. This fails as QoS isn't supported on this protocol (they're all local connections). So it goes on and does other things.

If you're having some kind of problem, your question gives no clue what it is.

share|improve this answer
I wish that were the case, but all signals point to a problem. Could you explain how the message: "Operation not supported" is nothing to worry about? If you looked at your mysql process, would you also see this message repeating over and over? –  brant Mar 28 '12 at 0:45
This is normal behavior -- QoS isn't supported on local connections. (You say it's "over and over" but if you look, it's actually once per connection, the minimum needed to determine that QoS is not supported on that connection.) If there are any signals that point to a problem, you haven't told anyone what they are. We can't diagnose a problem if you don't even tell us a single symptom. –  David Schwartz Mar 28 '12 at 0:59
I two reasons to think this: 1) NewRelic is reporting that response times have increased by around ~20ms since the server move. (That big spike is during the move). 2) WHM/Cpanel shows the mysqld process is using 12.1 CPU%, whereas before it was at 7.3%. All of this has happened after a switch to a more powerful server. Before I had 4 Cores @2.4Gz and 4 gig mem. Now its 10 Total Cores (Intel(R) Xeon(R) CPU E5645 @ 2.40GHz) and 8 gig of mem. It makes no sense as to why mysql would be performing worse on a better box with the same code. –  brant Mar 28 '12 at 2:50
@brant: The higher CPU usage is basically meaningless since you're not under significant load -- you can't snooze efficiently. (And likely your older CPU had faster cores. What CPU was it?). The latency almost certainly is about network distance, not server performance. (20ms would just mean 10ms more each way -- a datacenter 150 fiber miles further away or so.) –  David Schwartz Mar 28 '12 at 3:00
I think we're getting confused because we're doing this all through comments. Why don't you post a question about the issues you're having and include as much detail as possible about what changed, how you measured, and what you measured. –  David Schwartz Mar 28 '12 at 3:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.