Hi,
I'm using haproxy version 2.8.9 and noticed strange behavior of the SPOE
engine. I see many logs like below. From what I managed to investigate, the
error with value 2 is defined as SPOE_CTX_ERR_RES (an error was triggered
during the resources allocation) and this particular error is set only in
spoe_queue_context function.

So probably there is an issue with that logic of creating applets, but I'm
unable to understand what is wrong with it. I don't have any limits in spoe
configuration so it should not be the cause.

/* Check if we need to create a new SPOE applet or not. */
        if (agent->rt[tid].processing < agent->rt[tid].idles  ||
            agent->rt[tid].processing <
read_freq_ctr(&agent->rt[tid].processing_per_sec))
                goto end;

        SPOE_PRINTF(stderr, "%d.%06d [SPOE/%-15s] %s: stream=%p"
                    " - try to create new SPOE appctx\n",
                    (int)date.tv_sec, (int)date.tv_usec, agent->id,
__FUNCTION__,
                    ctx->strm);

        spoe_create_appctx(conf);

  end:
        /* The only reason to return an error is when there is no applet */
        if (LIST_ISEMPTY(&agent->rt[tid].applets)) {
                ctx->status_code = SPOE_CTX_ERR_RES;
                return -1;
        }

Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704430 st=2 -1/-1/-1/-1/0 42/43 0/1 3431/89801
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704436 st=2 -1/-1/-1/-1/0 42/43 0/1 3432/89802
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704447 st=2 -1/-1/-1/-1/0 42/43 0/1 3433/89805
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704470 st=2 -1/-1/-1/-1/0 42/43 0/1 3434/89809
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704539 st=2 -1/-1/-1/-1/0 41/43 0/2 3435/89821
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704797 st=2 -1/-1/-1/-1/0 42/43 0/1 3436/89847
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704834 st=2 -1/-1/-1/-1/0 43/43 0/0 3437/89849
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=704953 st=2 -1/-1/-1/-1/0 43/43 0/0 3438/89864
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705002 st=2 -1/-1/-1/-1/0 43/44 1/0 3439/89867
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705003 st=2 -1/-1/-1/-1/0 43/44 1/0 3440/89868
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705152 st=2 -1/-1/-1/-1/0 40/44 0/4 3441/89882
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705203 st=2 -1/-1/-1/-1/0 43/44 0/1 3442/89890
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705214 st=2 -1/-1/-1/-1/0 43/44 0/1 3443/89891
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705327 st=2 -1/-1/-1/-1/0 40/44 0/4 3444/89900
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705347 st=2 -1/-1/-1/-1/0 44/44 0/0 3445/89905
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705457 st=2 -1/-1/-1/-1/0 42/42 0/0 3446/89922
Jul  5 12:42:29 haproxy: SPOE: [agent] <EVENT:on-frontend-http-request>
sid=705642 st=2 -1/-1/-1/-1/0 42/42 0/0 3447/89943

Kind regards,
Maciej Zdeb

Reply via email to