Page 1 of 1

event_scheduler ?

Posted: Wed Jun 12, 2024 7:22 pm
by mister_v
Hi,

Code: Select all

SHOW FULL PROCESSLIST;
I noticed a process that is running for a long time.
What is this process ?
and why is it running.

Code: Select all

event_scheduler | localhost | NULL | Daemon  |   14 | Waiting on empty queue 

Re: event_scheduler ?

Posted: Wed Jun 12, 2024 7:25 pm
by chris
The event_Scheduler is, a way to Schedule Events (in this case queries) to run in MySQL at a given time.
It is simply waiting for an event to trigger it.

It is enabled by default, but can be disabled by running:

Code: Select all

SET @@global.event_scheduler = 0;
or add it to my.conf of /etc/mysql/mysql.conf.d/mysqld.cnf (depending on you system/version)

Code: Select all

event_scheduler = OFF
and restart your MYSQL server.

I haven't noticed any impact on performance,
but I don't really use events, so ...