<html><body><div style="font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000"><div>The programmers currently use a file to specify the IP of the remote SQL server. As a work around for the time being I have added a 2nd interface to the front end server and the remote SQL server. </div><div><br data-mce-bogus="1"></div><div>These are the errors we get when we hit the 65k limit. </div><div>mysqli_connect(): Can't connect to MySQL server on '192.168.98.19' (99)<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Front end </div><div>192.168.99.8</div><div>192.169.98.9 </div><div><br data-mce-bogus="1"></div><div>Remote SQL </div><div>192.168.99.19</div><div>192.168.98.19 </div><div><br data-mce-bogus="1"></div><div>There is a file where I can specify which IP to use ( 192.168.99.19 or 192.168.98.19) wrote a script to change that IP when we hit 30k connections. </div><div><br data-mce-bogus="1"></div><div><div>SQLIP=`cat /MYSQL_HOST`</div><div>COUNT=`netstat -an | grep $SQLIP | wc -l`</div><div><br></div><div>if [ "$SQLIP" = "192.168.98.19" ];then</div><div>FLIP="192.168.99.19"</div><div>else</div><div>FLIP="192.168.98.19"</div><div>fi</div><div><br></div><div>if [ $COUNT -gt 30000 ];then</div><div>echo "$FLIP"  > /MYSQL_HOST</div><div>COUNTFLIP=`netstat -an | grep $FLIP | wc -l`</div><div>echo "$SQLIP Hit $COUNT switching IP to $FLIP with $COUNTFLIP connections - $(date)" >> $LOG</div><div>fi</div></div><div><br></div><div><br data-mce-bogus="1"></div><div>There just seems like a better way to have something else "load balance" between 2 lan IP's. </div><div><br data-mce-bogus="1"></div><div><br></div><div data-marker="__SIG_PRE__"><div><br></div><div><span></span><div><span style="font-size: medium;"><strong>Best Regards,</strong> <br>
</span> <span style="color: #666666;"><b><span style="font-family: arial, helvetica, sans-serif;">
Brandon Mallory</span><br>
Network & Systems Engineer<br>
<span style="color: #339999;"><b>MEDENT EMR/EHR</b><br>
</span> <span style="color: #666666;"><b>
15 Hulbert Street<br>
Auburn, NY 13021<br>
Phone: <span class="Object" id="OBJ_PREFIX _DWT174_com_zimbra_phone"><a href="callto:(315)-255-0900" target="_blank">(315)-255-0900</a></span><br>
Fax: <span class="Object" id="OBJ_PREFIX_DWT175_com_zimbra_phone"><a href="callto:(315)-255-3539" target="_blank">(315)-255-3539</a></span><a><br>
Web: <span class="Object" id="OBJ_PREFIX_DWT177_com_zimbra_url"></span></a><a target="_blank" href="http://www.medent.com">www.medent.com</a></b></span></b></span><b><b><br><br>
<img src="https://webmail.medent.com/zimbra/sigs/defmailsig_nocchit.jpg" style="border: 0pt none;"><br><br>
This message and any attachments may contain information that is protected by law as privileged and confidential, and is transmitted for the sole use of the intended recipient(s). If you are not the intended recipient, you are hereby notified that any use, dissemination, copying or retention of this e-mail or the information contained herein is strictly prohibited. If you received this e-mail in error, please immediately notify the sender by e-mail, and permanently delete this e-mail.<br></b></b></div><div><b><b><br><span></span><br></b></b></div></div></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Reinis Rozitis" <r@roze.lv><br><b>To: </b>"nginx" <nginx@nginx.org><br><b>Sent: </b>Thursday, May 16, 2019 10:38:43 AM<br><b>Subject: </b>RE: Port Exhaustion - SQL<br></div><div><br></div><div data-marker="__QUOTED_TEXT__">Ohh I missed the whole idea that nginx is used as tcp balancer for mysql.<br><br>But imo it is still more simple (unless you can't do anything with the DB server) to balance the remote server rather than split and bind local clients:<br><br>upstream backend {<br> least_conn;<br> server ip1:3306;<br> server ip2:3306;<br> server ip3:3306;<br>}<br><br>rr<br><br>_______________________________________________<br>nginx mailing list<br>nginx@nginx.org<br>http://mailman.nginx.org/mailman/listinfo/nginx<br></div></div></body></html>