intel / asynch_mode_nginx

Other
210 stars 61 forks source link

bugfix: nginx crashes when enable thread pool. #64

Open zhuizhuhaomeng opened 1 year ago

zhuizhuhaomeng commented 1 year ago

Signed-off-by: lijunlong lijunlong@openresty.com

WalterRan commented 1 year ago

Thank you for your PR. Would you please provide more detail information about how to reproduce this issue? And we'll test internally.

zhuizhuhaomeng commented 1 year ago

I did not provide the signed-off in the old PR. Please goto https://github.com/intel/asynch_mode_nginx/pull/52 for more detail.

WalterRan commented 1 year ago

Thanks for your contribution, the patch will be tested internally and included in the next release.

mapicccy commented 1 year ago

I have also met this issue. And I fixed this problem just exactly as the author does

The nginx config file is nginx-ori.conf, the content:

thread_pool dlb threads=16 max_queue=65535;
http {
    aio threads=dlb;
    xxx;
}

Start the nginx: nginx -p pwd -c nginx-ori.conf Start the benchmark:

k6 run -u 32 script.js

And the content of the script.js:

import http from 'k6/http';
import { check, sleep } from 'k6';

export let options = {
    insecureSkipTLSVerify: true,
    noConnectionReuse: true,
    noVUConnectionReuse: true,

    duration: '20s',
};

export default function () {
    const res = http.get('https://localhost:9001/', {headers: {"Accept-Encoding": "gzip"}});
    check(res, { 'status was 200': (r) => r.status == 200 });
}

Debug nginx: image