Ok, but how should I do that?
Tuesday, November 3, 2015 4:45 PM via Postbox
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tuesday, November 3, 2015 4:28 PM via Postbox
Ok, but how should I do that?
Nelson, Erik - 2 wrote:
Tuesday, November 3, 2015 4:26 PM via Postbox
Bogdan Irimia Sent: Tuesday, November 03, 2015 4:23 AM
Maybe have the workers decide among themselves how to divide up the work to balance it out?
----------------------------------------------------------------------
This message, and any attachments, is for the intended recipient(s) only, may contain information that is privileged, confidential and/or proprietary and subject to important terms and conditions available at http://www.bankofamerica.com/emaildisclaimer. If you are not the intended recipient, please delete this message.
Tuesday, November 3, 2015 11:22 AM via PostboxHello, everybody
In our application we have the following situation: we have a set of parameters that need to be calculated offline (with a timer), at different intervals. What we do is we start a timer (with ngx.timer.at) for each parameter, with the corresponding interval, in init_worker_by_lua_file. Each timer, when it runs, sets a lock (using the lua-resty-lock library) and executes the processing code. The lock has the role of avoiding computing the same parameter in each worker.
With this configuration, the load between workers is different. It is very possible that all the work is done by one worker, and all the others stay idle. What we would like is to find a method to balance the work between these workers.
Do you guys have any suggestions?
Thank you
Bogdan Irimia
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In my case, header_string had been read from the body of a URL that was served by ngx.say() and consequently had a trailing newline (that I failed to trim off); it was not intended to be multi-line data.
The warning/error was correct; it *was* a protocol violation, which is how I defined ‘corrupt’. I’m not saying there’s anything unexplained or incorrect with openresty.
There’s nothing to be solved, just a searchable note on the list that might help someone spend less time tracking the problem down than I did.
From: openre...@googlegroups.com [mailto:openre...@googlegroups.com]
On Behalf Of Lord Nynex
Sent: Friday, November 06, 2015 1:11 PM
To: openre...@googlegroups.com
Subject: Re: [openresty-en] warning about headers with CR/LF
Hello,
Can you explain more details? CR/LF is what is defined in the standard for separating header values. You can read more about that here http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
If header_string contains CR/LF anywhere but the end of the string, this is a protocol violation and the warning you receive is correct. Headers aren't the best place to store multi-line data. It should not be necessary to insert cr/lf line terminators into header strings manually as nginx should do this for you.
Can you explain what you mean by 'corrupt' ?
On Fri, Nov 6, 2015 at 9:44 AM, Nelson, Erik - 2 <erik.l...@bankofamerica.com> wrote:
I'm using openresty 1.9.3.1 on RHEL5, I noticed if I set a header like
ngx.header['X-Custom-Error'] = header_string
that the output headers will be corrupted if header_string has CR/LF in it. It makes sense, just surprised me. The error from the C# client that I saw was
"The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF"
Just a heads-up in case someone else runs into that.
.
----------------------------------------------------------------------