Kong / Kong/lua-resty-timer-ng

Issue with timerng - lua udp socket read timed out

Open
#31 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Lua
Stars
7
Forks
6
PR merge metrics
No merged PRs in 30d

Description

Hello,

I hope you are doing well.

I have an OpenResty implementation feature that is used as a counter via a timerng object. The code related to the functionality that is being used is the following:
`local timer_module = require("resty.timerng")`
`local timer_sys = timer_module.new({restart_thread_after_runs = 1000}) -- restart_thread_after_runs was added after the problem started`
`[. . .] -- unrelated other nginx code`
`timer_sys:start()`
`timer_sys:named_every(key, 1, function_new)
`

After about an hour of execution, we are seeing the following logs:
`2024/07/26 09:03:08 [error] 1771830#1771830: *1339053 lua udp socket read timed out, client: [IP], server: , request: "GET [Request_URI] HTTP/2.0", host: "[host]"`

Have you ever encountered an issue similar to that one and what would be a possible solution?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the OpenResty setup that creates the timerng object, calls start(), and schedules named_every, then inspect the surrounding nginx logs for the UDP timeout. Reproduce the reported behavior after sustained execution and determine whether it is caused by timerng usage or the surrounding socket handling; document the cause and a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, nginx
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.