Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have moved a production server over to OpenVZ, something that I've done many times before, only this time it has impacted the transaction behaviour of certain operations.

All my tables are innoDB. I haven't changed any parameters from their out of the box state.

Certain requests to JBoss are resulting in transactions which take exactly 10 seconds to complete, but only intermittently. Usually they are lightning fast.

I can't find anything in my.cnf or in Mysql's variables that corresponds to this 10 second delay. I can see the transactions appearing in Innotop, but if I switch to Q - query mode, I am unable to see the full query by pressing f.

There doesn't seem to be any kind of rollback, because even when delayed, the functionality is not broken. JBoss has a transaction timeout of 300s as per the standard config.

I see no limits hit in /proc/user_beancounters (OpenVZ tracks when VM's exceed their resource quotas for those that don't know what this is).

I am struggling to identify where this bottleneck is coming from.

share|improve this question

OK, I can answer this now.

I read into how Mysql handles connections and it turns out it apparently always tries a reverse lookup unless you tell it not to, and times out trying this after 10 seconds.

I don't know why it was intermittently timing out on my network, but by adding:


to my.cnf, the problem has gone away.

It doesn't actually make complete sense to me because Jboss uses pooled connections, which should be remaining active due to a volume of regular activity, but nevermind.

share|improve this answer

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.