Welcome! Log In Create A New Profile

Advanced

Nginx + embedded perl, sharing variables across workers

April 06, 2011 05:28PM
Hi,

I have written a perl handler that generates a random value and needs to maintain the same value consistently across all other perl handlers (as there is 1 perl handler per nginx worker) until the workers are restarted;

I've attempted to do so by issuing $r->variable('varname', $rand) to no avail - is it impossible to set a variable defined in nginx.conf and have the new setting affect any further reads of that variable from other workers?
Which options do I have if I'd like to share $varname across multiple perl handlers?

Thanks!
Yuri
Subject Author Posted

Nginx + embedded perl, sharing variables across workers

yuri April 06, 2011 05:28PM

Re: Nginx + embedded perl, sharing variables across workers

Maxim Dounin April 06, 2011 07:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 234
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