'conn error

Hi,

can somebody tell me when exactly a 'conn error is thrown. I got some of theses error in my log file and don’t know why this happens.

according to http://code.kx.com/wiki/Errors  the error means “too many connections (1022 max)”.

But I can not reproduce it with a hopen loop, i receive a hop error after already 252 connections:

a:{<:`::1025}'!100

k){<:`::1025}

'hop: Too many open files

#.z.W

252

Also on the server side I don’t receive 'conn but an accp error

q)\p 1025  /now i connect from another instance..

q)'accp: Too many open files

q)count .z.W

251

looks like my system(?) limit is 255 file descriptors (client has 252 open + stdin,stdout,stderr;  server has 251 open + listening socket + stdin,stdout,stderr)

Also why does the Errors Page state 1022 max connections? where does this limit come from?

regards,

Markus

 

okay, already solved the mystery:  my above test was executed on macos. I looks like kdb throws other errors on this system.

on linux (where the conn problem occured) other errors are thrown on the server side:

q)\p 1026

q)   /.. connecting now

q)'conn

q)count .z.W

1008

client side:  (first connections to 1027 fill up the server and produce the error above;  second connection attempt to 1028 fill up the client)

  a:{<:`::1027}'!2000

k){<:`::1027}

'hop: Connection reset by peer

<:

`::1027

  )\

  

  #.z.W

1008

  

  a:{<:`::1026}'!2000

k){<:`::1026}

'conn

<:

`::1026

  )\

  

  #.z.W

1009

Besides the limit set within kdb+, you need to also consider the limits at the OS level. Try ulimit -a to get some sense of such limits.