PhpStorm 2016.3 slow database connection

After updating to 2016.3 from 2016.2 I'm having issues connecting to my database. It takes considerably more time then it did on 2016.2 (few seconds), now on 2016.3 it takes more then a minute.

Basically when I open a table from the database it takes around 2 minutes of "connecting" buffering and then it shows the database credentials dialog, after which it establishes the connection immediately.

I've never had this problem before, and the only thing that changed was the version of PhpStorm.

I'm using:
OS: Linux Mint 18 Sarah
Environment: Virtualbox + Vagrant for the virtual machine that holds the database.

Thank you for your time.

0
16 comments

Could you please install 2016.2.2 back (alongside with 2016.3) and

1) Check that it still connects quickly

2) If it is, collect the IDE log after you do a couple of things within your DB

Then, do the same things in 2016.3 and collect the log again.

You can upload the logs here: https://uploads.jetbrains.com/

0

I've changed back and it works perfectly. But 2016.3 is still slow.
I've uploaded the idea.log (after a fiddling around in the 2016.2 database) as you've requested.

0

Thank you. This log is for 2016.2.2. Is it possible to get the same log for 2016.3 (with the same procedures run)?

0

Ah sorry, I didn't read the whole request (I'm a bit busy at the moment).

I've uploaded the 2 logs you've requested. This is the best I can do to make them similar.
If that's not good enough i will re-upload when i get the time to do it 100% the same.

The procedure was:
connect_to_db > access_a_table > add_a_letter > commit > remove_the_letter > commit

0

The 2016.3 log doesn't contain any SQL events for some reason, but it doesn't matter - it seems that the debug information written to the log won't help us in any way as it's kinda scrappy.

Please enable CPU profiler (Help | Diagnostic | Enable CPU Profiler), restart PhpStorm, start recording a snapshot (Tools | Start CPU Usage Profiling), perform the same actions sequence, stop writing the snapshot and upload it.

I really hope something will come up there.

What is the DB by the way?

0

Database: MySQL 5.7.12-0ubuntu1.1 , running on Ubuntu 16.04 LTS

Sorry I forgot to mention it.
Ok I'll do this procedure and upload the snapshot, but I'll have to do it tomorrow, it's late.
Thank you for the awesome support, talk to you soon.

0

I can't enable or start CPU Profiler.
I've tried the way you said (no response at all was given when Enabled CPU Profiler) and there was no "Start CPU Usage Profiling"  inside Tools with or without resetting PhpStorm.

I've tried with sudo, without sudo, manually or via ctrl+shift+a (action finder), nothing worked.
I can see the "Profiling Actions: Start CPU Usage Profiling" in the list of actions within action finder, but it's grayed out all the time and i can not toggle it.

I've ran out of ideas on how I could start the snapshot...

0

Mihailo, on a side note: could you please try to 

1) run File > Invalidate Caches/Restart > Invalidate and Restart

2) delete and create connection to this DB from scratch in 2016.3

1

> I've tried the way you said (no response at all was given when Enabled CPU Profiler) 

There should be no response, just a new item should appear in the Tools menu.

Please try enabling the profiler accordingly to:
https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

0

YES ! That did it.

After I did what you've said, everything is working smooth and fast.

Thank you for the awesome support. :)

0

Dimitri this did fix the problem but not permanently.
I need to create a new db every time i start a new instance of PhpStorm.
Do you have any idea why this is happening? If not I can provide the data Eugene requested, and we can start from there.

I'm starting my PhpStorm via `sudo phpstorm` command from terminal. I'm not sure if this might have something to with this problem.

0

Hm, that's weird. Yes, please provide the data Eugene requested. Ideally we would need:

1) restart IDE, reproduce the issue, copy & attach/upload idea.log file 

2) restart IDE, start CPU profiling, reproduce the issue, stop CPU profiling, upload resulting snapshot

0

Ok I did what you requested.

Process for getting the CPU profiling:
1. Open PhpStorm (via terminal `sudo phpstorm`)
2. Start CPU Profiling
3. Open DB Tab
4. Access a table from the DB
5. Wait (a few minutes) for the password prompt, fill in the form and proceed
6. Stopped profiling 
EXIT

Process for getting the idea.log:
1. Open PhpStorm (via terminal `sudo phpstorm`)
2. Open DB Tab
3. Access a table from the DB
5. Wait (a few minutes) for the password prompt, fill in the form and proceed
6. Help > show log file in files
EXIT

Both files were uploaded on 28.12.2016 20:20 (UTC +1).
I hope you find the information useful, sorry I took so long to respond I didn't have the time.

0

Nothing in the snapshot, unfortunately.
But! As far as I remember the previous 2016.3 log results (I can't find this file anymore), the output has changed.
Could you please install gnome-keyring (or switch to using KeePass in Appearance & Behavior | System Settings | Passwords) and check how it goes afterwards?
If it's still slow, please re-upload the log.

1

Thank you very much guys.
Eugene your latest solution seems to be working so far, I hope it will stay like that.

Settings > Appearence & Behavior > System Settings > Passwords > In KeePass

If I run into some problems I'll post the information here.

1

jfyi -- i encountered similar problems with PyCharm and the root cause was that gnome-keyring-daemon had not been running.

0

Please sign in to leave a comment.