# KDB Tick with 'conn error

**URL:** <https://forum.kx.com/t/kdb-tick-with-conn-error/13584>\
**Category:** Community Support\
**Tags:** imported, kdb-and-q\
**Created:** [October 4, 2022, 12:00am UTC](https://forum.kx.com/t/kdb-tick-with-conn-error/13584 "2022-10-04T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![k-mambo](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/k-mambo/32/128_2.png) [@k-mambo](https://forum.kx.com/u/k-mambo)\
**Post date:** [October 4, 2022, 12:00am UTC](https://forum.kx.com/t/kdb-tick-with-conn-error/13584/1 "2022-10-04T00:00:00Z")

</div>

[https://learninghub.kx.com/forums/topic/kdb-tick-with-conn-error](https://learninghub.kx.com/forums/topic/kdb-tick-with-conn-error)

The connection reset by peer log is continuously left when requested from the HDB process to the unix domain socket from the HDB process, and the RDB process is constantly experiencing a 'conn error.

What information should be identified to determine this cause? We need help from KX experts.

And this is an additional question related to KDB Ticker.

Does the RDB process need to shut down and run again to initialize the max connection limit(1022)?

Is there a good way to reconnect when the connection with the RDB process is lost after running the ticker?

Env : [AWS Kx Insights AMI (Ubuntu 20.04 LTS)](https://aws.amazon.com/marketplace/pp/prodview-pscy5dov2ftms?sr=0-1&ref_=beagle&applicationId=AWSMPContessa")

---

<div class="post-metadata">

**Author:** ![rocuinneagain](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/rocuinneagain/32/287_2.png) [@rocuinneagain](https://forum.kx.com/u/rocuinneagain)\
**Post date:** [October 4, 2022, 12:00am UTC](https://forum.kx.com/t/kdb-tick-with-conn-error/13584/2 "2022-10-04T00:00:00Z")

</div>

https://code.kx.com/q/basics/errors/#:~:text=conn,connections%20(1022%20max)

The conn error happens when the limit of 1022 open connections is hit.

Some process(es) must be continuously opening handles but not closing them after use.

You can count [.z.W](https://code.kx.com/q/ref/dotz/#zw-handles") at any time to see how many open handles there are.

[-38!](https://code.kx.com/q/basics/internal/#-38x-socket-table") can give you information on the type of each open handle.

At any time you can force close handles using [hclose](https://code.kx.com/q/ref/hopen/#hclose").

&nbsp;

To trace the source of the problem you can add logging and monitoring to the port open and close call-backs, [.z.po](https://code.kx.com/q/ref/dotz/#zpo-open") and[.z.pc](https://code.kx.com/q/ref/dotz/#zpc-close").

One example is the [dotz](https://code.kx.com/q/kb/using-dotz/") library which you can customise to your needs.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![k-mambo](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/k-mambo/32/128_2.png) [@k-mambo](https://forum.kx.com/u/k-mambo)\
**Post date:** [October 5, 2022, 12:00am UTC](https://forum.kx.com/t/kdb-tick-with-conn-error/13584/3 "2022-10-05T00:00:00Z")

</div>

How to determine max connections in q process?

If a daemon process and a new connection is not possible due to the above reasons, what should I do?

---

<div class="post-metadata">

**Author:** ![rocuinneagain](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/rocuinneagain/32/287_2.png) [@rocuinneagain](https://forum.kx.com/u/rocuinneagain)\
**Post date:** [October 5, 2022, 12:00am UTC](https://forum.kx.com/t/kdb-tick-with-conn-error/13584/4 "2022-10-05T00:00:00Z")

</div>

`lsof` and `netstat` can give you information about the open handles even if you cannot connect yourself
