KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Can I apply a timeout for a spectific query or client request?

  • Can I apply a timeout for a spectific query or client request?

    Posted by k-mambo on March 17, 2022 at 12:00 am

    currently, there is a phenomenon in which there is no response between processes due to some request, but it is difficult to determine why. I know that the default timeout for the process can be set to T commands . I want to keep the default timeout to 60 seconds and limit it to 5 seconds only for specific query requests.  Is there a way?

     

    k-mambo replied 8 months, 2 weeks ago 2 Members · 1 Reply
  • 1 Reply
  • pmallon

    Member
    March 17, 2022 at 12:00 am

    Hi,

    Maybe something like this on the process servicing the queries:

     

    funcTimeouts:`func1``func2`func3!60 5 10;
    
    .z.pg:{ system T , string funcTimeouts x 0; value x }

    Not complete above as need to consider funcs not in the dictionary and possibly resetting T after. Also, above assumes you call a function over the handle in list format.

    Adding logging to .z.pg might help you identify the issue too.

    Let me know if this helps.

    Patrick

     

Log in to reply.