nginx-rs
nginx-rs copied to clipboard
Request.user_agent will crash when send lot of request
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