runaway CPU

charlieo's profile image charlieo posted 5 years ago in General Permalink

In the last week I've found that periodically when I launch HeidiSQL (64-bit Win 10) 10.2.0.5693 (and others) that after I click the connection the app disappears and in task manager it's using 15-25% of CPU, no disk, no network and it just churns. I've let it run for 10 and even 20 minutes and it doesn't come back. I kill it. Run again and sometimes it works but often not. I'm connecting to MySQL/RDS at AWS; no other load on DB.

Anyone else seeing this?

Charlie

charlieo's profile image charlieo posted 5 years ago Permalink

And if no else has seen this, any suggestions to try to figure out what is happening would be appreciated too.

charlieo's profile image charlieo posted 5 years ago Permalink

One last note: MySQL workbench works fine while Heidi still churns...

ansgar's profile image ansgar posted 5 years ago Permalink

Never heard that before. But that sounds like Heidi is stuck in some endless loop, probably a bug in the code. Though without crash it will be nearly impossible to find the offending lines of code.

If I could access that server maybe I can debug stuff with a high probability to have such an endless loop.

charlieo's profile image charlieo posted 5 years ago Permalink

Thanks for responding to my post on the forum. I'm happy to give you access to the DB but the problem appears limited only to my very-recent Windows 10 machine. It's a Thinkpad X1 carbon that's 60 days old.

Heidi worked fine on this machine until a few weeks ago. Then it started going into this runaway CPU mode periodically but ran sometimes. Now it never runs. I launch the app, click a connection and it immediately goes away. Interestingly, I can see from the server side that it is connected to the DB. So it's getting hung up someplace between establishing the connection and rendering the UI.

On the Windows side, I can see it in task manager (see attached screenshot) but the UI never appears. Heidi continues to work on other machines, just not this one.

I've uninstalled, restarted and installed the latest nightly build but no change.

Suggestions to debug?

Charlie

Charlie

ansgar's profile image ansgar posted 5 years ago Permalink

You could start HeidiSQL up to the session manager, then click "More", click "Preferences", then go to "Logging" and activate "Debug messages". Also, activate "Write SQL log to file" and watch out for new log files in the folder mentioned right besides it. Click "OK" to apply. Then connect to your server and see what has been written to the log file folder.

charlieo's profile image charlieo posted 5 years ago Permalink

Great suggestions. I think I discovered the problem.

The logs go all the way through restoring tab setup and then the last thing I see is Loading file ... that was a saved file that was open on the last successful run.

So I went back into preferences and unchecked "reopen previously used SQl files...". Then I launched and it worked.

The file in question is still there and I'm able to open it. And when I turn the "reopen previously..." option back on, it works.

So, perhaps there was a bad file pointer or something that couldn't be resolved and so Heidi just hung there. Perhaps the "reopen..." needs to timeout if it can't do it.

Regardless, thank you so much for your suggestions that led to discovering a path forward.

BTW, I want to tell you how much I appreciate the save tabs feature. It completely changes how I use the product. Before, I would keep a word processor open and keep copying queries to it in case there was a crash or an inadvertent reboot. Now the work is always saved and so I am much more willing to experiment in different tabs. Thank you for that!!

And lastly, one more question: I installed Heidi on a colleague's computer and no matter what we do, it refuses to connect to the database. I can use his credentials and it works. We've checked the firewall settings and allowed Heidi. Now that you've told me about the logging and debug, I will try to look at those. Any other suggestions to debug that?

Keep up the great work.

Charlie

ansgar's profile image ansgar posted 5 years ago Permalink

Any other suggestions to debug that?

The first thing I am always looking at is the Windows Defender Firewall. If the server ip is correct, you should at least get an error message from the server, not due to some timeout problem. If you post the message I can probably tell more.

dekker's profile image dekker posted 5 years ago Permalink

I have the same issue with the runaway CPU on Windows 10 and Heidi 10.3.0.5771 64bit portable connecting to MS SQL. It's makes it almost unusable since work on queries cannot be saved.

ansgar's profile image ansgar posted 5 years ago Permalink

@dekker I would suggest to update to the latest built installer, from the nightly builds section of the download page.

Please login to leave a reply, or register at first.