Problem with MySQL connection through load balancer

Winfield, Alister Alister.Winfield at bskyb.com
Thu Jul 24 10:33:40 CEST 2014


If no other sane options exist then enabling more aggressive TCP-keepalive
probes can often help here.


On 23/07/2014 23:59, "Dean Goldhill" <dgoldhill at netutils.com> wrote:

>Thanks very much.
>That does clear up where I should be looking.
>
>I will update if I find a solution.
>
>Sent from my iPhone
>
>> On 23 Jul 2014, at 17:39, "Phil Mayers" <p.mayers at imperial.ac.uk> wrote:
>>
>>> On 23/07/14 17:10, Dean Goldhill wrote:
>>>
>>> I have tried to use the Œlifetime = 120¹ option in the sql.conf
>>>
>>> Under normal operation, this will cause radius to close and
>>>re-establish
>>> the SQL connection every 120 seconds, so I hoped that when in this
>>>stuck
>>> state, it would do the same and re-establish the connection. But does
>>>not.
>>
>> The problem is, FreeRADIUS will be blocked inside the mysql libraries.
>>So "lifetime" probably won't help.
>>
>>>
>>> Is there anything someone can suggest?
>>>
>>> I don¹t have the ability to sync the session table between the 2 load
>>> balancers.
>>
>> The problem isn't FreeRADIUS - it's the mysql libraries. They're not
>>detecting the dead connections.
>>
>> Does the load balancer have the ability to return a TCP RST or ICMP
>>error when it receives a packet for an unknown session? If so, this will
>>probably trigger the mysql libraries to drop the connection, and
>>FreeRADIUS to reconnect.
>>
>> Otherwise, you'll need to investigate if MySQL has any form of dead
>>connection detection, and how you can persuade your mysql libraries to
>>do it.
>>
>> TCP keepalives probably won't help - they're usually too slow for this
>>kind of thing.
>>
>> Alternatively, something like:
>>
>> http://dev.mysql.com/downloads/mysql-proxy/
>>
>> ...could be run locally. We use pgbouncer on postgres for this - it can
>>check the connection is alive before sending a query and reconnect as
>>needed.
>> -
>> List info/subscribe/unsubscribe? See
>>http://www.freeradius.org/list/users.html
>-
>List info/subscribe/unsubscribe? See
>http://www.freeradius.org/list/users.html

Information in this email including any attachments may be privileged, confidential and is intended exclusively for the addressee. The views expressed may not be official policy, but the personal views of the originator. If you have received it in error, please notify the sender by return e-mail and delete it from your system. You should not reproduce, distribute, store, retransmit, use or disclose its contents to anyone. Please note we reserve the right to monitor all e-mail communication through our internal and external networks. SKY and the SKY marks are trademarks of British Sky Broadcasting Group plc and Sky International AG and are used under licence. British Sky Broadcasting Limited (Registration No. 2906991), Sky-In-Home Service Limited (Registration No. 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are direct or indirect subsidiaries of British Sky Broadcasting Group plc (Registration No. 2247735). All of the companies mentioned in this paragraph are incorporated in England and Wales and share the same registered office at Grant Way, Isleworth, Middlesex TW7 5QD.


More information about the Freeradius-Users mailing list