Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Load Balanced MYSQL timeouts?

Greetings all,

Sorry if I am in the wrong forum... I am new to this stuff

I have been tasked with load balancing two MYSQL servers for a single glassfish front end. On our big-ip ltm I have setup a basic virtual server with source address persistence and snat on port 3306 with no port translation. After about 5 minutes, the glassfish connection to mysql times out and loses connection.

If we bypass the f5 there is no issue.
I have removed the second mysql server from the pool so there is only one node but no luck. I have tried tcp_longtimeout but that didn't help either.

Any advice or ideas are greatly appreciated! Im not really sure where to start troubleshooting, and of course it is now all the networks fault :D.

Thank You,
Jason
1
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Are you using SNAT Automap? If you are using SNAT, have you changed timeout? SNAT automap have hardcoded 300 sec timeout, and the defaut setting for the SNAT is 300 seconds as well, but you can change it.

Check solution 6017 at tech.f5.com knowledgebase for SNAT configuration.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Thanks Johns, I had created a tcp profile, but totally forgot about the snat. I was able to create a snat and add it to a new snat pool, so i now have many options for tweaking timeout.

All that said, it turns out the culprit was a misconfigured glassfish server that was not setup to attempt to reconnect after the initial session...

Thanks again for the insight.
Cheers,
Jason
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
We are using automap and load balancing MySQL and seeing some problems with timeouts. Would these timeouts only affect idle connections or active connections as well? We have some large inserts that take much longer than 5 minutes and seeing some issues.

If I create a SNAT, and assign it to this Virtual Server, when then do I go to increase the timeouts?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

If I create a SNAT, and assign it to this Virtual Server, when then do I go to increase the timeouts?


In your client-side TCP profile. If you haven't yet created a custom one for this particular Virtual Server, I would start by basing one off of the TCP profile you are already using on the client side of the connection and experiment with the timeout settings in it.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
We are using automap and load balancing MySQL and seeing some problems with timeouts. Would these timeouts only affect idle connections or active connections as well?


Idle timeouts only affect idle connections. Each time a packet on the connection arrives at LTM, the idle timeout should be reset to 0. You can see this in the 'b conn all show all' output.

If I create a SNAT, and assign it to this Virtual Server, when then do I go to increase the timeouts?


See SOL7606 for details on this:

SOL7606: Overview of BIG-IP LTM idle session timeouts
https://support.f5.com/kb/en-us/solutions/public/7000/600/sol7606.html

A virtual server matching an automap SNAT
If the connection matches a virtual server and an automap SNAT, the protocol profile idle timeout value will be used. For example, if the virtual server references a protocol profile with a 500 second idle timeout, the idle connection flow will be deleted using the protocol profile idle timeout of 500 seconds.

Note: An automap SNAT has a non-configurable idle timeout of 300 seconds.


If you want to increase the hard coded 300 second idle timeout on the SNAT, you could configure a custom SNAT using the floating self IP address on the egress VLAN as the SNAT pool. You can then configure the idle timeout under Local Traffic ›› SNATs : SNAT Translation List ›› 1.2.3.4 where 1.2.3.4 is the SNAT IP you've configured in the SNAT pool.

Aaron
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER
Thanks guys. This is an improvement so far.
0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

can u please tell the steps to create Load Balanced MYSQL in f5 big ip ?

0