# Getting error while connecting Dremio via Apache Arrow flight

**URL:** <https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934>\
**Category:** Uncategorized\
**Created:** [November 15, 2022, 3:09pm UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934 "2022-11-15T15:09:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![s.ranjan0404](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@s.ranjan0404](https://community.dremio.com/u/s.ranjan0404)\
**Post date:** [November 15, 2022, 3:09pm UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934/1 "2022-11-15T15:09:17Z")

</div>

Hi, I am trying to use Apache Arrow flight in our spring-boot application to connect Dremio, it was working fine, but after sometime we found **“User Session is not available in the cache”** error message while connecting to dremio. After i restart our microservice it started working. Not able to identify where and what is the issue. Appreciate a help. Thanks.

---

<div class="post-metadata">

**Author:** ![cindy.la](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/cindy.la/32/6730_2.png) [@cindy.la](https://community.dremio.com/u/cindy.la)\
**Post date:** [November 16, 2022, 8:20pm UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934/2 "2022-11-16T20:20:56Z")

</div>

Hi @s.ranjan0404 ,

Thanks for sending over the additional details. What version of Maven are you running and does this error occur with Dremio Software or Dremio Cloud?

Cindy

@hope

---

<div class="post-metadata">

**Author:** ![cindy.la](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/cindy.la/32/6730_2.png) [@cindy.la](https://community.dremio.com/u/cindy.la)\
**Post date:** [November 17, 2022, 12:12am UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934/3 "2022-11-17T00:12:16Z")

</div>

Additionally, do you have a rough idea of how long before you receive that error? Is it 120 minutes? Our documentation mentions this for Flight Sessions for both Dremio Software and Cloud:

> A Flight session has a duration of 120 minutes during which a Flight client interacts with Dremio Cloud.

[https://docs.dremio.com/cloud/arrow-flight/arrow-flight/#flight-sessions](https://docs.dremio.com/cloud/arrow-flight/arrow-flight/#flight-sessions) (Dremio Cloud)  
[Developing Arrow Flight Client Applications for Dremio | Dremio Documentation](https://docs.dremio.com/software/developing-client-apps/arrow-flight/#flight-sessions) (Dremio Software)

You can change the duration on Dremio Software by modifying `usersessions.ttl.seconds` in the `dremio.conf` file per above Software link.

Dremio Cloud currently only supports 120 minutes.

---

<div class="post-metadata">

**Author:** ![s.ranjan0404](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@s.ranjan0404](https://community.dremio.com/u/s.ranjan0404)\
**Post date:** [November 17, 2022, 3:04am UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934/4 "2022-11-17T03:04:56Z")

</div>

> [@cindy.la](#):
>
> Additionally, do you have a rough idea of how long before you receive that error? Is it 120 minutes? Our documentation mentions this for Flight Sessions for both Dremio Software and Cl

Hi @cindy.la,

Thanks for the information. In our code some how i was initializing multiple flightClients for one request. i have changed the code and will keep under observation. Will let you know if i get the same issue again.

Regards,  
Soumya Ranjan

---

<div class="post-metadata">

**Author:** ![nachti](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/nachti/32/5005_2.png) [@nachti](https://community.dremio.com/u/nachti)\
**Post date:** [June 27, 2023, 1:27pm UTC](https://community.dremio.com/t/getting-error-while-connecting-dremio-via-apache-arrow-flight/9934/5 "2023-06-27T13:27:06Z")

</div>

Thanks for reporting it s.ranjan0404!  
Same here, but after few seconds which is quite annoying.  
Using the JAVA Flight Client (not JDBC) didn’t time out so far. Therefore I think it’s not a Server config problem.
