CCS
May 16, 2019 11:14AM
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.

These are the errors we get when we hit the 65k limit.
mysqli_connect(): Can't connect to MySQL server on '192.168.98.19' (99)

Front end
192.168.99.8
192.169.98.9

Remote SQL
192.168.99.19
192.168.98.19

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.

SQLIP=`cat /MYSQL_HOST`
COUNT=`netstat -an | grep $SQLIP | wc -l`

if [ "$SQLIP" = "192.168.98.19" ];then
FLIP="192.168.99.19"
else
FLIP="192.168.98.19"
fi

if [ $COUNT -gt 30000 ];then
echo "$FLIP" > /MYSQL_HOST
COUNTFLIP=`netstat -an | grep $FLIP | wc -l`
echo "$SQLIP Hit $COUNT switching IP to $FLIP with $COUNTFLIP connections - $(date)" >> $LOG
fi


There just seems like a better way to have something else "load balance" between 2 lan IP's.



Best Regards,
Brandon Mallory
Network & Systems Engineer
MEDENT EMR/EHR
15 Hulbert Street
Auburn, NY 13021
Phone: [ callto:(315)-255-0900 | (315)-255-0900 ]
Fax: [ callto:(315)-255-3539 | (315)-255-3539 ]
Web: [ http://www.medent.com/ | www.medent.com ]



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.




From: "Reinis Rozitis" <r@roze.lv>
To: "nginx" <nginx@nginx.org>
Sent: Thursday, May 16, 2019 10:38:43 AM
Subject: RE: Port Exhaustion - SQL

Ohh I missed the whole idea that nginx is used as tcp balancer for mysql.

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:

upstream backend {
least_conn;
server ip1:3306;
server ip2:3306;
server ip3:3306;
}

rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Port Exhaustion - SQL

CCS May 16, 2019 08:53AM

RE: Port Exhaustion - SQL

Reinis Rozitis May 16, 2019 09:10AM

Re: Port Exhaustion - SQL

CCS May 16, 2019 09:12AM

RE: Port Exhaustion - SQL

Reinis Rozitis May 16, 2019 09:36AM

Re: Port Exhaustion - SQL

CCS May 16, 2019 09:48AM

Re: Port Exhaustion - SQL

Maxim Konovalov May 16, 2019 09:52AM

Re: Port Exhaustion - SQL

CCS May 16, 2019 10:12AM

RE: Port Exhaustion - SQL

Reinis Rozitis May 16, 2019 10:40AM

Re: Port Exhaustion - SQL

CCS May 16, 2019 11:14AM

Re: Port Exhaustion - SQL

Maxim Konovalov May 16, 2019 10:18AM

RE: Port Exhaustion - SQL

Reinis Rozitis May 16, 2019 10:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 206
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready