Queries are very slow or do not complete (same queries in pgAdmin 4 are fast)

DataGrip 2017.1.4

Connecting to a remote PostgreSQL DB server with the latest version of the supplied driver.

 

I'll get a couple of queries to complete in the expected time then they start to perform very slow or not complete at al.

At the same time, and from the same system, I can connect and run queries in the expected time from pgAdmin 4.

 

I'm evaluating DG and prefer the feature set over pgAdmin but I have to be able to have queries complete in the expected time frame.

10 comments
Comment actions Permalink

Hi,

Could you provide any example and overtime value?

Thank you.

 

0
Comment actions Permalink

Pretty much anything: select * from table

select * from <any_table>;

283ms on pgAdmin.

> 15 minutes on DataGrip.

 

It's not consistent. DG will occasionally return results in the same time frame as pgAdmin but the majority of the time the queries are that slow.

0
Comment actions Permalink

@Dkennedy Hi,

Could it be network latency?

Are there any errors in IDE logs?

Could you capture packets with Wireshark?

Thank you.

0
Comment actions Permalink

I checked the log dir. I see two things there.

 

1. In the idea.log are WARNs and an error related to the bash shell a failure to run something from my ~/.bashrc :

2017-06-05 09:24:23,049 [ 20205] WARN - .intellij.util.EnvironmentUtil - shell env loader is timed out
2017-06-05 09:24:24,136 [ 21292] WARN - .intellij.util.EnvironmentUtil - failed to terminate shell env loader process gracefully, terminating forcibly
2017-06-05 09:24:24,264 [ 21420] WARN - .intellij.util.EnvironmentUtil - can't get shell environment
java.util.concurrent.ExecutionException: java.lang.Exception: rv:137 text:0 out:bash: no job control in this shell

 

2. Many threadDumps-freeze log directories with mutiple thread dump files in each.

I copied the first one from today here:

https://pastebin.com/axLQUcut

 

 

While DG is showing the spinner in the results window I can start the same query in pgAdmin and it will complete in < 1s.

0
Comment actions Permalink

Oops! The idea.log error:

 

2017-06-05 09:24:23,049 [ 20205] WARN - .intellij.util.EnvironmentUtil - shell env loader is timed out
2017-06-05 09:24:24,136 [ 21292] WARN - .intellij.util.EnvironmentUtil - failed to terminate shell env loader process gracefully, terminating forcibly
2017-06-05 09:24:24,264 [ 21420] WARN - .intellij.util.EnvironmentUtil - can't get shell environment java.util.concurrent.ExecutionException: java.lang.Exception: rv:137 text:0 out:bash: no job control in this shell

(Fails executing docker-machine to start a docker container that is already running.)

0
Comment actions Permalink

Do the thread dumps indicate a problem?

There are other people in the same organization running DataGrip without the problems I am seeing.

0
Comment actions Permalink

@Dkennedy Hi,
Logs and thread dump is not connected to your problem.
Do you run Postgres in docker?

Could you capture packets with Wireshark?

Thank you

 

0
Comment actions Permalink

Hi Vasily,

The Postrges server is remote production database server. I believe it is running in a container.

I haven't used Wireshark before. I did install it and it looks simple to have it capture a trace, but I have no idea whether to filter anything or any other settings needed.

 

Thanks

-D

0
Comment actions Permalink

I started up a Postgres docker on localhost and have no problems with DG queries to that instance.

0
Comment actions Permalink

Having the same problem a year later (and I'm not really surprised you haven't received an answer).

0

Please sign in to leave a comment.