Welcome! Log In Create A New Profile

Advanced

Nginx + embedded perl, timer based on signal handling

April 06, 2011 05:34PM
Hi,

I'm trying to use a perl handler to count the global number of GET/POST requests issued towards the server (the existing rate/connection limit modules are of no use to me as they are per-source).

The main problem I'm facing is not being able to reset the counter every second - I tried installing a timer function as the signal handler for SIGALRM, but when an alarm is received the worker process exists saying "worker process 73712 exited on signal 14";

Is there a way to make the worker process pass SIGALRM handing to embedded perl?
Are there any other ideas of how to achieve the same goal, of defining a function within that perl handler memory space that executes every 1 second without blocking nginx?

Thanks!
Yuri
Subject Author Posted

Nginx + embedded perl, timer based on signal handling

yuri April 06, 2011 05:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 297
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready