Open calh opened 1 year ago
I believe I have some more findings that make this issue a little more obvious.
Back in December when I bootstrapped this cluster, something must have failed on the first startup of proxysql:
# systemctl status proxysql-initial
● proxysql-initial.service - High Performance Advanced Proxy for MySQL, this service will reset the database and start ProxySQL
Loaded: loaded (/etc/systemd/system/proxysql-initial.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2022-12-28 10:13:33 CST; 2 months 7 days ago
Main PID: 15906 (code=exited, status=1/FAILURE)
systemd[1]: Starting High Performance Advanced Proxy for MySQL, this service will reset the database and start ProxySQL...
systemctl[15906]: Job for proxysql.service failed because a timeout was exceeded.
systemctl[15906]: See "systemctl status proxysql.service" and "journalctl -xe" for details.
systemd[1]: proxysql-initial.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: proxysql-initial.service: Failed with result 'exit-code'.
systemd[1]: Failed to start High Performance Advanced Proxy for MySQL, this service will reset the database and start ProxySQL.
Which shouldn't have been a big deal. I fixed things and started it up after that. However, since this one shot service failed, systemd has had this environment variable stuck in it the whole time:
# systemctl show-environment
LANG=en_US.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
PROXYSQL_OPTS=--initial
It apparently has been destroying and recreating the database every time I restart proxysql. When I work on this server, I'm also frequently adjusting the SQL config and loading it anyway. It only surfaced and became a problem when a crash happened.
This one shot service to destroy the database and recreate it is maybe a little dangerous to use on a deployed package. Is there some better way you can accomplish this? Or maybe a safer implementation of the --initial
flag that won't destroy an existing proxysql disk database?
[x] ProxySQL version: 2.4.5-146-ge590770, SHA1 checksum: c606f3f25d17a1211560ea6f2fee709def853448
[x] OS version: Rocky 8.7, kernel 4.18.0-425.3.1.el8.x86_64
[x] MySQL version 5.6.51
[x] The full ProxySQL error log (default location:
/var/lib/proxysql/proxysql.log
)In memory Standard Query Cache (SQC) rev. 1.2.0905 -- Query_Cache.cpp -- Wed Dec 14 12:20:55 2022 Standard MySQL Monitor (StdMyMon) rev. 2.0.1226 -- MySQL_Monitor.cpp -- Wed Dec 14 12:20:55 2022 2023-03-03 21:08:29 [INFO] For information about products and services visit: https://proxysql.com/ 2023-03-03 21:08:29 [INFO] For online documentation visit: https://proxysql.com/documentation/ 2023-03-03 21:08:29 [INFO] For support visit: https://proxysql.com/services/support/ 2023-03-03 21:08:29 [INFO] For consultancy visit: https://proxysql.com/services/consulting/
2023-03-03 21:08:29 MySQL_Session.cpp:4312:handler_minus1_LogErrorDuringQuery(): [WARNING] Error during query on (1,REDACTED,3306,1004501): 1193, Unknown system variable 'transaction_isolation' 2023-03-03 21:08:29 MySQL_Variables.cpp:320:validate_charset(): [WARNING] Server doesn't support collation (255) utf8mb4_0900_ai_ci. Replacing it with the configured default (33) utf8_general_ci. Client REDACTED