Hello!
On Mon, Dec 7, 2015 at 10:29 AM, Kim Brandt wrote:
> For example:
> [error] 173#0: *48089 [lua] ledge.lua:2340: fetch_from_origin(): timeout,
> client: x.x.x.x, server: _, request: "GET /request HTTP/1.1", host:
> "www.example.com"
Debugging timeouts requires advanced (dynamic tracing) tools to be sure.
Common causes are too short timeout threshold settings on the client
or slow backend servers that are too busy (intermittently). Sometimes,
if you are using some badly blocking operations (like slow disk
operations, too intensive CPU computations, and even bad Lua libraries
doing blocking I/O) in the nginx server) can also lead to timeout
errors, in which case, you can use the off-CPU time flame graph tool
to diagnose.
> [warn] 173#0: *48089 [lua] ledge.lua:444: couldn't set keepalive, socket
> busy reading, client: x.x.x.x, server: _, request: "GET /request HTTP/1.1",
> host: "www.example.com"
>
This looks like a user programming mistake on the Lua land. Basically
one should never call setkeepalive() on a cosocket in a "light thread"
while another "light thread" is busy reading from the same cosocket
(for obvious reasons). You should fix that in your Lua code (or some
other's Lua code you are using).
Best regards,
-agentzh