bug: event worker failed: failed to receive the header , attempt to index upvalue 'ev' (a nil value)

Aperta
#12,769 9 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
lua, nginx

Direzione di ricerca

Inizia leggendo worker.lua intorno alla riga 266 e resty/events/compat/init.lua intorno alla riga 47, quindi segui il modo in cui l’event worker comunica e gestisce una connessione chiusa. Riproduci o isola il problema in produzione, se possibile; il lavoro è completato quando i log degli errori di runtime e dell’event worker segnalati non si verificano più.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

question
Current Behavior

Seeing below error in our production apisix data-plane logs

2025/11/23 10:46:52 [error] 54#54: *643711487 stream [lua] worker.lua:266: communicate(): event worker failed: failed to receive the header bytes: closed, context: ngx.timer 2025/11/23 10:46:52 [error] 116#116: *643711540 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/events/compat/init.lua:47: attempt to index upvalue 'ev' (a nil value) 2025/11/23 10:46:52 [error] 52#52: *643711538 stream [lua] worker.lua:266: communicate(): event worker failed: failed to receive the header bytes: closed, context: ngx.timer

Expected Behavior

These error logs should not be there.

Error Logs

2025/11/23 10:46:52 [error] 54#54: *643711487 stream [lua] worker.lua:266: communicate(): event worker failed: failed to receive the header bytes: closed, context: ngx.timer 2025/11/23 10:46:52 [error] 116#116: *643711540 lua entry thread aborted: runtime error: /usr/local/openresty/lualib/resty/events/compat/init.lua:47: attempt to index upvalue 'ev' (a nil value) 2025/11/23 10:46:52 [error] 52#52: *643711538 stream [lua] worker.lua:266: communicate(): event worker failed: failed to receive the header bytes: closed, context: ngx.timer

Steps to Reproduce

Dont know. Happening in production deployment.

Environment
  • APISIX version (run apisix version):3.14.1

  • Operating system (run uname -a):Linux data-plane-7c4b955754-dp552 5.10.230-223.885.amzn2.x86_64 https://github.com/apache/apisix/pull/1 SMP Tue Dec 3 14:36:00 UTC 2024 x86_64 GNU/Linux

  • OpenResty / Nginx version (run openresty -V or nginx -V):nginx version: openresty/1.27.1.2 (x86_64-pc-linux-gnu)
    built by gcc 15.2.0 (Wolfi 15.2.0-r3)
    built with OpenSSL 3.6.0 1 Oct 2025
    TLS SNI support enabled

Lingua principale
Lua
Stelle
17.3k
Fork
3k
Merge medio
4g 14h
PR unite (30g)
73

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/apisix

Tutte le issue di apache/apisix

Issue simili

Altre issue su Lua

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.