Hello Erel!
Thank you for your reply.
All devices connected to the websocket server, do a ping every 10 seconds. With every ping, I do an update of the coordinates of the devices.
I have ~450 concurrent devices connected. I suppose that every device must make one connection to the database.
Watching the DB open processes from a front-end tool like SQLyog or HeidiSQL, some times the processes are more than the devices.
I've seen ~750 processes for ~450 devices. This is the reason I've increased the max_connections of the DB.
Before increasing, the websocket server hanged the pool and closed all connections. The server worked correctly again, only when I stopped and started the application. This is the actual problem.
Now, I have changed temporarily my code to do:
If not(SQL.IsInitialized) Then SQL = pool.GetConnection
and I haven't noticed any problem! It does not create more connections than the number of the devices.
The wait_timeout variable of the DB has the value 45 (seconds).