Layer7 API Management

 View Only
Expand all | Collapse all

Any way to find the amount of time request was queued when thread pool has maxed out?

  • 1.  Any way to find the amount of time request was queued when thread pool has maxed out?

    Posted Oct 13, 2019 08:05 PM
    Hi All,

    I want to find out whether we have any way/ context variable to capture time the request came to gateway but was queued due  to thread pool being exceeded. I want to find out this time. Either the whole time = queued time + processing time + backend time or only the queued time as dashboard shows only processing and backend time.

    Please let me know if there is any way to get this number.


  • 2.  RE: Any way to find the amount of time request was queued when thread pool has maxed out?
    Best Answer

    Posted Nov 04, 2019 08:00 AM
    Hello Abhishek,

    if you want to calculate the complete time span of api(request + response time),you can check the front-end  time for the particular service in dashboard because frontend time always includes backend time.
    another way you can try to do  network trace from browser to get the total time and to get the stats of stalled thread.

     SELECT SUM(STALLED_QUERIES_EXECUTED) / SUM(QUERIES_EXECUTED)
    FROM INFORMATION_SCHEMA.TP_THREAD_GROUP_STATS;

    As per above results run the below command from console:
    ss -o state established \( sport = :8080 or sport = :8443 or sport = :9443 \) \ dst 0.0.0.0/0 | egrep -v Recv-Q | wc -l

    If the number is way higher than the value of io.httpMaxConcurrency, that means  lot of requests are queued within the Gateway.

    regards,
    Atul Ranjan