Requests that go on forever and no response

Hello! I use Datagrip to access my database and very often for very simple queries like: SELECT id FROM public.cosmetics t LIMIT 201 I get no response and the query never gets the answer
13 Replies
CustomEntity
CustomEntityOP4mo ago
And it only does it for my Xata databases
tsg
tsg4mo ago
hi, can you tell me your workspace id (it's in the URL). If I get that I can look at the logs. If you'd rather have it private, please open a support request.
cmck
cmck4mo ago
Hi, thanks for sharing your workspace ID, I can see some errors in the logs here from the 21st starting 21:05 UTC. I assume this was when you were running your queries?
CustomEntity
CustomEntityOP4mo ago
Yes, it probably is haha I've noticed that it does this on tables with about 1000 rows, I don't have the problem on tables with about ten rows
cmck
cmck3mo ago
Hi @CustomEntity thanks for your patience while we looked into this. Do you have any recent examples of the hanging select query? A rough timestamp of when you saw it last would help us diagnose the issue.
Jan H
Jan H3mo ago
Hi, not sure if the same, but I am seeing maybe similar with Ruby on Rails? Seems like kind of "cold-start" behavior? After what seems like not more that 5 minutes of inactivity, the next run of my app (DB query) takes so long it timeouts. In logs I can see connection to DB took 38 seconds. After that, all is OK until I am inactive few minutes again.
cmck
cmck3mo ago
Hi @Jan H, can you please open a ticket by contacting [email protected] ? Please include your workspace ID and any relevant timestamps, logs, error messages etc. and I'll take a look 👍
CustomEntity
CustomEntityOP2mo ago
Hello! Sorry for the delay, it's a simple select all
CustomEntity
CustomEntityOP2mo ago
No description
cmck
cmck2mo ago
Thanks for sharing @CustomEntity , I can see the related call in the backend and looks like it took 4+ minutes to eventually return an error. I'll continue to investigate and keep you posted. Hey @CustomEntity thanks for bearing with me. As I suspected judging by the query, the query itself executes very quickly. There appears to be an issue in a hanging connection establishment. Does it happen for other queries or exclusively for this select from ability_media ? Also, if you have a recent timestamp in UTC of when you started a query that went on to hang, please let me know. The more up-to-date information I have, the better.
CustomEntity
CustomEntityOP6d ago
Hello, the problem occurs in all the databases I have on Xata. As soon as I do a select all with about 500-1000 elements I get a query that never ends
cmck
cmck5d ago
Out of interest, does the same happen if you connect using pgAdmin and run the same query? Looking at our logs from last night I can see some connections that stayed open for a long time before they were closed. To clarify, do the queries ever execute or is it just when you try to run them for the first time that they hang? Thanks for bearing with us. If you can share a timestamp in UTC with a date of when you last cancelled a long running query, that would be great.

Did you find this page helpful?