Re: Can the use of Ephemeral ports be disabled?
Posted by: Mark Blake
Date: April 07, 2014 02:55AM

I believe I have found the answer to my original question, which is No.
The use of ephemeral ports to maintain the connection is arranged by the OS not Mysql. I have already responded to them to advise that I think their suggestion is not possible.

Rick James Wrote:

> Let's focus on this:
>
> Are you referring to the setting in mysql of
> max_connections?

Yes.

> Again, are you referring to max_connections?

Yes, I have left it at the default of 151.
The maximum physical clients I have is about 60, 12 people and about 48 machines.

> > so it connects on 3306, does it business, disappears, then creates a new connection 5 mins later,

Yes but its 30 seconds not 5 mins, i must have had a brain fade when I wrote up the original question.

> That's good. Does it actually disconnect? Or does it somehow hang onto that connection and create another connection?

It does not disconnect, the original connection is reported in Connections on the mysql server as "Sleep"

The client is configured to make a connection every 15 seconds, it should use its existing one, it obviously takes 15 seconds to figure out it can't, so then creates a new one


> > eventually using up my max users limit, and filling my logs unnecessarily.
>
> Which "logs"? MySQL does not have a log of connections.

The main thing is the logs in my management application, not Mysql. Every 30 seconds there is an entry that the connection to the database on my remote machine is lost, then connected again. That seriously obfuscates important events that I need to keep an eye out for :-(

> Perhaps another problem is involved... What are the clients?

A desktop Application compiled in XOJO, that has a mysql connector plugin running. The client is actually a vending machine


>If so, how many "children" are the configured for?

I don't know what that means. Each client should only connect once and maintain that connection. None of my other devices in widely varied networks, have this issue.


>If that number is bigger than MySQL's max_connections, you can run out of connections. Decrease the web server's max.

Yes thats what was originally happening until I reduced wait_timeout to 600 seconds. that keeps the max-connections below the limit.
There doesn't seem to be any real advantage in increasing either.

Options: ReplyQuote


Subject
Written By
Posted
Re: Can the use of Ephemeral ports be disabled?
April 07, 2014 02:55AM


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.