# Timeout on export query

**URL:** <https://community.questdb.com/t/timeout-on-export-query/801>\
**Category:** Community\
**Tags:** question\
**Created:** [April 9, 2025, 10:43pm UTC](https://community.questdb.com/t/timeout-on-export-query/801 "2025-04-09T22:43:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thom](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/thom/32/376_2.png) [@Thom](https://community.questdb.com/u/Thom)\
**Post date:** [April 9, 2025, 10:43pm UTC](https://community.questdb.com/t/timeout-on-export-query/801/1 "2025-04-09T22:43:18Z")

</div>

Hello,

I have a program on which I need to make changes and so on each version I generates the results and put them on QuestDB to compare them in order to check that there is no regression. The problem is that each run generates several milions of lines and when I try to compare the results across multiples runs I get a timeout. I cant put the exact query but it’s something looking like

With  
T1 as (select … from table where Run=n)  
T2 as (select … from table where Run=n+1)  
Select \* from t1  
Join t2 on t1.timestamp=t2.timestamp where…

As I’m too familiar with SQL this might be the issue. Also I saw on the website that you can specify the timeout for import but is there a way to do it for exporting ? In my case I cant just download the data in csv and compare them.

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [April 9, 2025, 10:49pm UTC](https://community.questdb.com/t/timeout-on-export-query/801/2 "2025-04-09T22:49:16Z")

</div>

Hey, can you run your query with `EXPLAIN` and share the plan?

You can increase the query timeout using `query.timeout.sec` setting in `server.conf`. It defaults to 60 seconds.

---

<div class="post-metadata">

**Author:** ![Thom](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/thom/32/376_2.png) [@Thom](https://community.questdb.com/u/Thom)\
**Post date:** [April 10, 2025, 9:05am UTC](https://community.questdb.com/t/timeout-on-export-query/801/3 "2025-04-10T09:05:33Z")

</div>

Hi thanks for the timeout issue, now it’s working well

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [April 10, 2025, 9:08am UTC](https://community.questdb.com/t/timeout-on-export-query/801/4 "2025-04-10T09:08:34Z")

</div>

No problem. If you need more help, let us know.

We may be able to help improve your data layout or queries 🙂

---

<div class="post-metadata">

**Author:** ![Thom](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/thom/32/376_2.png) [@Thom](https://community.questdb.com/u/Thom)\
**Post date:** [April 10, 2025, 12:25pm UTC](https://community.questdb.com/t/timeout-on-export-query/801/5 "2025-04-10T12:25:42Z")

</div>

Hi,  
It was working well this morning but now the queries give me sun.misc.Unsafe.reallocateMemory() OutOfMemorryError [RSS\_MEM\_USED=3581902412, oldSize=2147483648, newSize=4294967296, memoryTag=29], original message: unable to allocate 4294967296 bytes.

The same queries but the table got a bit bigger (because there are more runs but no more elements per run), is there a way to fix this ?

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [April 10, 2025, 12:26pm UTC](https://community.questdb.com/t/timeout-on-export-query/801/6 "2025-04-10T12:26:40Z")

</div>

What does your deployment look like? Did you follow this?

> **[Capacity planning | QuestDB](https://questdb.com/docs/operations/capacity-planning/#os-configuration)**
>
> How to plan and configure system resources, database configuration, and client application code available to QuestDB to ensure that server operation continues uninterrupted.

If you could share your query and schema too, that’d be good. It may be that you have too many groups/too large a join.
