Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4829  / 2 Years ago, mon, august 8, 2022, 12:56:55

I have very long queries text (~50 lines). Recently MySQL workbecnh is exhibiting strange behavior. While editing the query (I open it, I edit one character and want to continue to the next), it freezes forever.



I suspect it can be something related to memory? I see in the preferences there is a default value for maximum query length to store in history in bytes with this default value: 65536. Is this relevant? What do you suggest?



My device is running Ubuntu 18.04 and the workbench is verion 8.0 which is the latest. I cleaned the temp files using: clean and autoclean commands but no hope.



Please help me how to overcome this problem. Knowing that I do not face it when I edit the query in a text editor. Just when I am using the workbench editor. But it is not practical to use external editor.



I also tried to reboot and shut down my device and open the database connection again.



If you need the log, please specify the step to get it for you.


More From » 18.04

 Answers
6

Not an answer, but it can help you debug if it's a memory problem



1.- Open mysql-workbench from a terminal window with mysql-workbench --log-level=debug3 -v



2.- Open a second terminal and run this command to monitor the memory and set a baseline, it will autoupdate every 2 seconds (in GB)



while true; do ps aux | grep 'mysql-workbench-bin' | grep -v -E 'grep|catchsegv' |  awk '{$5=int(100 * $5/1024/1024)/100"GB";}{ print;}' | awk '{print $5" "$11}'; sleep 2; done


It will output something like this
0.93GB /usr/lib/mysql-workbench/mysql-workbench-bin every 2 seconds.



3.- Open the query in mysql-workbench and monitor the increase of memory (if any).

Also check the output of the terminal running mysql-workbench.



4.- Open a 3rd terminal and run htop, that will give you an overview of the general usage (cpu/memory/swap) of your system.


[#5597] Wednesday, August 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
byishted

Total Points: 469
Total Questions: 113
Total Answers: 113

Location: Tajikistan
Member since Sun, Aug 29, 2021
3 Years ago
;