# IllegalStateException: IndexConnection must be open after fraction of query timeout

**URL:** <https://community.stardog.com/t/illegalstateexception-indexconnection-must-be-open-after-fraction-of-query-timeout/2477>\
**Category:** Support\
**Created:** [May 26, 2020, 9:38am UTC](https://community.stardog.com/t/illegalstateexception-indexconnection-must-be-open-after-fraction-of-query-timeout/2477 "2020-05-26T09:38:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![witold\_makiewicz](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@witold\_makiewicz](https://community.stardog.com/u/witold_makiewicz)\
**Post date:** [May 26, 2020, 9:38am UTC](https://community.stardog.com/t/illegalstateexception-indexconnection-must-be-open-after-fraction-of-query-timeout/2477/1 "2020-05-26T09:38:48Z")

</div>

Hello  
I'm getting the `IndexConnection must be open` after 10 or 15 mins even though query tmeout is set to an hour. What am I missing?

Stardog version: 7.3.0  
Dataset: LDBC SNB @SF100 (~5B triples)  
Queries: Interactive Complex {ic3, ic4, ic9} from [https://github.com/ldbc/ldbc\_snb\_implementations/tree/dev/sparql/queries](https://github.com/ldbc/ldbc_snb_implementations/tree/dev/sparql/queries)  
Driver: `pystardog`  
Stardog properties:

```auto
query.timeout=3600s
memory.mode=read_optimized

```

---

<div class="post-metadata">

**Author:** ![pavel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pavel/32/18_2.png) [@pavel](https://community.stardog.com/u/pavel)\
**Post date:** [May 26, 2020, 9:54am UTC](https://community.stardog.com/t/illegalstateexception-indexconnection-must-be-open-after-fraction-of-query-timeout/2477/2 "2020-05-26T09:54:57Z")

</div>

Hi Witold,

This exact error is an issue which is about to be fixed in 7.3.1 next week (the PR already merged). The problem is that the transaction which was started for the query expired before the query finished. If you look into `stardog.log` you'll probably see something about closing a tx due to inactivity. It only happens at higher values for `query.timeout`. You need to set the `database.connection.timeout` property to something greater than `3600s`.

Stardog 7.3.1 won't let transactions expire while a query is making progress.

Best,  
Pavel

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 9, 2020, 9:54am UTC](https://community.stardog.com/t/illegalstateexception-indexconnection-must-be-open-after-fraction-of-query-timeout/2477/3 "2020-06-09T09:54:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
