Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Request.user_agent will crash when send lot of request #2

Open
alex8224 opened this issue May 28, 2022 · 0 comments
Open

Request.user_agent will crash when send lot of request #2

alex8224 opened this issue May 28, 2022 · 0 comments

Comments

@alex8224
Copy link

alex8224 commented May 28, 2022

normally, It works well.

http_request_handler!(ngx_http_hello_world_handler, |request: &mut Request| {

    // Ignore client request body if any
    if !request.discard_request_body().is_ok() {
        return HTTP_INTERNAL_SERVER_ERROR.into();
    }

    // Create body
    let user_agent = request.user_agent(); //will crash 
    let uri = request.uri(); 

but if I send too many requests ,It will crash, error.log will output lot error logs as below

2022/05/28 23:03:39 [alert] 18733#0: worker process 20181 exited on signal 11
2022/05/28 23:03:39 [alert] 18733#0: worker process 20182 exited on signal 11
2022/05/28 23:03:39 [alert] 18733#0: worker process 20183 exited on signal 11
2022/05/28 23:03:39 [alert] 18733#0: worker process 20184 exited on signal 11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant