Scheduler and workers spam MariaDB connections
See original GitHub issueDescription of the issue
The mariadb server is spammed with these messages:
# Time: 211111 16:26:28
# User@Host: root[root] @ localhost []
# Thread_id: 126175 Schema: QC_hit: No
# Query_time: 0.000641 Lock_time: 0.000300 Rows_sent: 3 Rows_examined: 3
# Rows_affected: 0 Bytes_sent: 745
SET timestamp=1636647988;
select * from mysql.wsrep_cluster_members;
2021-11-11 16:26:28 126177 [Warning] Aborted connection 126177 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.128' (This connection closed normally without authentication)
2021-11-11 16:26:28 126178 [Warning] Aborted connection 126178 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.128' (This connection closed normally without authentication)
2021-11-11 16:26:28 126179 [Warning] Aborted connection 126179 to db: 'unconnected' user: 'unauthenticated' host: '10.42.2.55' (This connection closed normally without authentication)
2021-11-11 16:26:29 126180 [Warning] Aborted connection 126180 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.131' (This connection closed normally without authentication)
2021-11-11 16:26:29 126181 [Warning] Aborted connection 126181 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.129' (This connection closed normally without authentication)
2021-11-11 16:26:33 126182 [Warning] Aborted connection 126182 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.132' (This connection closed normally without authentication)
2021-11-11 16:26:34 126183 [Warning] Aborted connection 126183 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.129' (This connection closed normally without authentication)
2021-11-11 16:26:34 126184 [Warning] Aborted connection 126184 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.131' (This connection closed normally without authentication)
2021-11-11 16:26:34 126185 [Warning] Aborted connection 126185 to db: 'unconnected' user: 'unauthenticated' host: '10.42.0.129' (This connection closed normally without authentication)
The IPs belong to the worker and scheduler pods in the Kubernetes cluster.
Context information (for bug reports)
Output of bench version
erpnext 13.13.0
frappe 13.13.0
Steps to reproduce the issue
- Install ERPNext
- Observe MariaDB logs
Observed result
Many connections to the DB server.
Expected result
Probably only a few permanent connections?
Additional information
Official ERPNext Helm Chart, v13.13.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Thread Pool in MariaDB
MySQL traditionally assigned a thread for every client connection, and as the number of concurrent users grows this model shows performance drops.
Read more >Manage database connections | Cloud SQL for MySQL
This page provides best practices and language-specific code samples to help you create applications that use Cloud SQL database connections effectively.
Read more >MySQL Event Scheduler on a specific time everyday
This might be too late for your work, but here is how I did it. I want something run everyday at 1AM -...
Read more >MariaDB vs MySQL: A Database Technologies Rundown
Ports and sockets are the same. All MySQL connectors — PHP, Perl, Python, Java, and others — work with MariaDB. MySQL client package...
Read more >How To Start Logging With MariaDB | Better Stack Community
Error log: Problems encountered during starting, running, or stopping the server. · General query logs: Records every connection established with each client.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the last hour there are around 20 jobs that all succeeded.
@ankush This has nothing to do with infrastructure. As I see it, the scheduler and workers set up a connection to the database without yet authenticating and then drop that connection. They do that very second or so. Is it a preemptive connection which gets dropped, when there are no tasks to be done?