MySql showing 800 connections when no user is online? - mysql

I am using Springboot for Server side development and mysql workbench is showing more than 800 connection in development server when no user is connected or online. Here is the screenshot of mysql workbench server status.
Please help how am i getting these number of connection and how can I rectify this error.

When you deploy a spring-boot application it creates a connection pool which sits idle if there is not load on the server (meaning in your terms that no user is online) these connections are still maintained. Hence, when you check the number of DB connections from WorkBench, it'll show you that many number of connections used by server.

Related

Increase the amount of connections in my server MySQL

I have aplications that connect to a remote server (MySQL 5.5 on Windows Server 2012), at first I started receiving "too many connections" message which I solved by increasing MAX_CONNECTION value in my.inf to 500, then I start getting "can't create new thread" message so I decrease decrease timeouts to avoid idle connections using a socket, which didn't completely work. Now I get odd messages like 'file not found', as soon as I restart the service I stop getting the messages and everything works correctly.
The problem occurs when the server reaches around 170 connections at the same time.
Is there some configuration I'm missing?, I really don't know what info you need to give me a hint to fix this. I mean, there are servers that accept a lot morw of connections at the same time, right? waht I'm missing.
RAM and CPU of the system dosen't reach 35-40% at max connections (170).
Edit: Error occur at 2 'places', when running a query or at the attempt of conennection, it's like the MySQL service rejects the attempt. VB6 is the language used in the client app (ODBC connector). The app opens, executes and closes the connection.
Note: I have full control over client app and server config.

FireDAC Lost connection to MySQL server during query

I have two FireDAC connections on my application, one is intended to be used on a MySQL Server that is on LAN and store private data of the my shop (like sales, products, etc), and the another one is connected to a remote (internet) MySQL Server, and it randomly give me a exception
First chance exception at $745AA882. Exception class
EMySQLNativeException with message '[FireDAC][Phys][MySQL] Lost
connection to MySQL server during query'.
Is this a issue on FireDAC, my code or the remote MySQL Server?
Using NAVICAT software I have no problem.
This error usually occurs because the Internet Connectivity is not stable and connection closed during exchanging data
Sometimes you can solve this issue with increasing the connection Time-Out (and ReadTimeOut )
Sometimes this error occurs because you are trying to send or receive large amount of data like Blob fields and you should increase the max_allowed_packet variable of MySQL Server to solve the problem
The next suggestion for solving this problem is avoiding dns lookup by adding skip-name-resolve to the settings of your MySQL Server
The Main reasons of this problem is connection stability and MySQL Server Settings
If you have access to MySQL server and can change the settings, this link may be useful :
http://www.monitis.com/blog/101-tips-to-mysql-tuning-and-optimization/
You can find many articles about increasing performance of MySQL Server

MySQL Lost Connection on OpenShift gear

I keep getting "Lost connection to MySQL server at 'reading initial communication packet'" on my gear which happens every 2 to 3 hours. My gear is a scaled instance with php and mysql
First I would check to make sure you're not hitting any memory limitations on your app. Check out this FAQ to find out how to check https://www.openshift.com/kb/kb-e1082-how-to-check-for-memory-limit-violations.
If you are hitting memory limit's then I would suggest creating a scalable app which will put your app and database on separate gears.

random connection error cant connect to mysql database server 10060

Our Application is using mysql database from remote linux server at port 3306
Application is connecting to database server using TCP/IP protocol from windows xp service pack 3 machine.Application works well almost all time but some times it is giving following error randomly "[MySQL][ODBC 5.1 Driver]Can't connect to MySQL Server on 'IP Adderss' (10060)". Only one desktop user is facing this issue from around 240 users.
Application is developed in VB6.
Database server: mysql 5.1.51
can any one suggest possible cause of this error ?
As the error occurs randomly in just one client machine , we have change network card on particular machine and then user has not face same issue from last week.It was due to interrupted network connectivity of client machine to database server

Connecting to remote MySQL problems

Having a bit of a problem with mysql...
Mysql 5.1 on windows 2008 server iis7
Site on windows 2003 server iis6
[sorry but can't move to linux kids! ;)]
In the process of shifting a site to a new server so I have moved the database 1st and connected the site to the new database. I tested the connection before moving but now the site is connecting to the new database I am having problems....
connecting via PDO the page hangs for an age before getting 'too many connections' error. Monitoring the server I see MANY threads of: 'unathenticated user' from the ip address of the host the site runs on.
I also see a thread for the connection with the correct user name in my config file and I am a total loss as to what is going on.
Any help would be very much appreciated
'unathenticated user' from the ip address of the host the site runs on
A stab in the dark, but this could be some script or process trying to connect to the database server with wrong or empty credentials.
Also, here's a report from somebody who had similar problems - in that case, it was the DNS lookup that caused the problem.
I had a similar situation on my setup where the database lived on a different host than
the webserver. I found the "unauthenticated users" were connections from the webserver
that were hanging on DNS lookups. Don't know if this is a mysql bug or a bug with my
firewall / other setup, but a couple of fixes I found were...
1) start mysql with --skip-name-resolve (you may have to change your mysql permission
tables to have the host's IP instead of hostname, including localhost)
or 2) add the connecting host to your /etc/hosts file.