Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

high CPU #2017

Closed
al404 opened this issue Nov 12, 2014 · 21 comments
Closed

high CPU #2017

al404 opened this issue Nov 12, 2014 · 21 comments

Comments

@al404
Copy link

al404 commented Nov 12, 2014

with 10.10 upgrade sequel pro some times gets stuck with 99% cpu usage
on this upgrade i switch from OS X system apache / mysql to MAMP pro

not sure if CPU usage is due to 10.10 or MAMP
but sequel pro get unusable i need to force exit

@dmoagx
Copy link
Member

dmoagx commented Nov 12, 2014

Please provide more details.
The next time Sequel Pro hangs, open Activity Monitor, select Sequel Pro, click on View > Analyze Process and post the output.

@al404
Copy link
Author

al404 commented Nov 12, 2014

i have an italian hope this is the right dump, it seems that on a certain sequence i can reproduce hang

Sample: https://gist.github.com/dmoagx/e1b96139895f05964371 (Note: link replaced by dmoagx)

if i past the output it says that is too big for comment

@al404
Copy link
Author

al404 commented Nov 12, 2014

i would point that high CPU happens when i open a small DB with 11 tables
i did a CHECK and OPTIMIZE on all of them but doesn't make any difference

the hang seems to happen when i select only one of this tables, not sure if this is related, on this table i duplicate a text field within sequel pro
it is something that i don't usually do

table has 20 fields, 6 text field
i tried to export, drop table, import with phpmyadmin and the reopen sequel pro but did not make any difference

@messageagency
Copy link

I can also get the CPU to spike at 98% -- by altering a table.

For a db with 367 tables, I use the UI to alter a single table VARCHAR column from 255 to 40 chars.
Even for a table with only one row, CPU redlines and doesn't come back down -- i have to force-quit.

This happens nearly every time i make a schema alteration with the UI.
When I run an equivalent query manually, the CPU does not spike.

This behavior was frequent on OSX 10.8, and is now consistent on OSX 10.10

@ischemic
Copy link

I also get this CPU spike on 10.10 when altering a table.

screen shot 2014-11-21 at 10 56 12

@dmoagx
Copy link
Member

dmoagx commented Nov 21, 2014

Please include the process sample as I have explained in my first comment!

@noahwilliamsson
Copy link
Contributor

I've experienced the same problem with the latest version on OS X 10.10.1. Things worked fine until I added a few new integer columns to a table mostly consisting of integer columns. As soon as I select the problematic table in question Sequel Pro starts taking 100% CPU and become very sluggish.

@dmoagx Below are links to samples, a spindump and the table definition. Things worked fine until I added the *_dnssec columns.
(FWIW, I've been unable to reproduce the problem by recreating the table on a different host without the relation constraint.)

Table SQL:

CREATE TABLE `reports` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `entity_id` int(11) unsigned NOT NULL,
  `created` date NOT NULL,
  `dnssec` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'DNSSEC on zone?',
  `ns_total` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'NS hostnames',
  `ns_ipv4` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'NS hostnames with A records',
  `ns_ipv6` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'NS hostnames with AAAA records',
  `ns_dnssec` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'NS hostnames with DNSSEC',
  `mx_total` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'MX hostnames',
  `mx_ipv4` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'MX hostnames with A',
  `mx_ipv6` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'MX hostnames with AAAA',
  `mx_dnssec` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'MX hostnames with DNSSEC',
  `mx_starttls` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'MX hostnames with STARTTLS support',
  `web_total` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Total number of HTTP/HTTPS hostnames',
  `web_ipv4` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of web hostnames with A records',
  `web_ipv6` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of web hostnames with AAAA records',
  `web_dnnsec` int(11) unsigned DEFAULT NULL COMMENT 'Number of web hostnames with DNSSEC',
  `https` varchar(16) NOT NULL DEFAULT 'no' COMMENT 'Partial if accessible over https in addition to http',
  `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `entity_id` (`entity_id`,`created`)
 --  ,CONSTRAINT `reports_ibfk_1` FOREIGN KEY (`entity_id`) REFERENCES `entities` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1757 DEFAULT CHARSET=utf8mb4

Sample 1:
https://pastebin.mozilla.org/7489087 (3MB) - download: https://pastebin.mozilla.org/?dl=7489087

Spindump 1 (expires within 24h):
https://pastebin.mozilla.org/7489104 (3MB) - download https://pastebin.mozilla.org/?dl=7489104

Sample 2:
https://pastebin.mozilla.org/7489088 (3MB) - download: https://pastebin.mozilla.org/?dl=7489088

@ozanhazer
Copy link

I'm having the same problem, 99% CPU
This is the sample when I was trying to add some field to a table:

https://gist.github.com/ozanhazer/530389a1f857fa9f356e

@dmoagx
Copy link
Member

dmoagx commented Dec 4, 2014

So far what these reports have in common is:

  • Unlike most hangs this samples show that the app is very active, updating screen contents
  • There are (nearly) no methods from Sequel Pro involved - this is 99% in Apples own code.

That makes the issue difficult to find, esp. since I haven't yet been able to reproduce it.
(However I found I can cause a hang similar to this one when running under Parallels Desktop, while VMWare Fusion works fine).

@jonchiu
Copy link

jonchiu commented Dec 16, 2014

There's a particular table in my database that causes Sequel Pro to hang when switching between the Structure/Content tabs.

Here is the sample:

https://gist.github.com/jonchiu/746e1778f3daff48ca54

@ghost
Copy link

ghost commented Jan 2, 2015

@ghost
Copy link

ghost commented Jan 2, 2015

Btw I tried with stable version and with Nightly build of SequalPro. And I didn't have this problems on Mountain lion, just on Yosemite. Also I installed MySql using brew (http://brew.sh)

@ghost
Copy link

ghost commented Jan 27, 2015

I've updated SequalPro to the latest Nightly Build, and I do not have issues anymore.

@ischemic
Copy link

I've just had this again adding fields to a table.

Sample here: https://gist.github.com/anonymous/7f58478e7da5c67fc8a0

@messageagency
Copy link

Here's another sample during adding a column:
https://gist.github.com/messageagency/56cc14895b748590c1e0

Clicked the "+" button on fields list.
Existing table with about 25 fields, and about 1000 rows.
Database with 2 tables total.
Localhost connection.
CPU still redlined at 100% as i'm writing this.

@dmoagx
Copy link
Member

dmoagx commented Feb 5, 2015

I believe you, but there isn't much I can do.
The samples are not really helpful for this issue (to me at least).

What we really need is some way to reliably reproduce this (I've not yet been able to personally).

@lucascepeda
Copy link

Got here because I had a similar problem, with high CPU times using Sequel Pro 1.1.
It got even high CPU times right after starting it, before connecting to a database.

The problem was the huge dumps on the query history. Clearing the query history solved the problem, and working with the dumped database (+500MB) works like a charm, again.

Just in case this solves someone else's problem!

@lalop
Copy link

lalop commented Dec 14, 2017

I have the same issue, @lucascepeda how did you clear the query history ?

@lucascepeda
Copy link

@lalop Go to "Query" (icon tab) -> "Query History" (dropwdown) -> "Clear Global History".

I hope that helps!

@lalop
Copy link

lalop commented Dec 15, 2017

@lucascepeda this helps a lot :)

@dmoagx
Copy link
Member

dmoagx commented Oct 14, 2018

I'll close this.
Apart from the large query history (which is already discussed in other issues) we have not been able to identify any problem.

@dmoagx dmoagx closed this as completed Oct 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants