Welcome! Log In Create A New Profile

Advanced

send_header with NGX_HTTP_INTERNAL_SERVER_ERROR code

June 16, 2016 11:41AM
Hello, I have created my own NGINX module, which get rest request and return a response.
When I send a response with status 500 (NGX_HTTP_INTERNAL_SERVER_ERROR) or 404 (NGX_HTTP_BAD_REQUEST) I see on the memory uses that the nginx processes is growing up
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8734 ortal 20 0 7761628 7.335g 1736 S 69.0 47.9 0:28.37 nginx

I am using the function 'ngx_http_send_header' which I saw uses 'ngx_http_headers_filter' which hadnle the cases of NGX_HTTP_INTERNAL_SERVER_ERROR and NGX_HTTP_BAD_REQUEST different then NGX_HTTP_OK for example.

What am I doing wrong? Which function should I use to send a bad response?

Thanks
Subject Author Posted

send_header with NGX_HTTP_INTERNAL_SERVER_ERROR code

Ortal June 16, 2016 11:41AM

Re: send_header with NGX_HTTP_INTERNAL_SERVER_ERROR code

itpp2012 June 16, 2016 12:11PM

Re: send_header with NGX_HTTP_INTERNAL_SERVER_ERROR code

Ortal June 19, 2016 04:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 97
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready