question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question

Hi!

Thank you very much for both the project and API! I am using the docker image to post request to Apprise as a gateway to Gotify.

It works most of the time but at night I often miss some notifications. There are some logs but I don’t understand them: what triggers this worker timeout? The app calling apprise-api, or the gotify server that apprise-api calls?

[2020-07-28 22:42:27 +0000] [183] [CRITICAL] WORKER TIMEOUT (pid:201)
2020/07/28 22:42:31 [error] 198#198: *31 upstream prematurely closed connection while reading response header from upstream, client: 172.17.0.1, server: _, request: "POST /notify HTTP/1.1", upstream: "http://127.0.0.1:8080/notify", host: "localhost:8000"
2020/07/28 22:42:31 [warn] 198#198: *31 upstream server temporarily disabled while reading response header from upstream, client: 172.17.0.1, server: _, request: "POST /notify HTTP/1.1", upstream: "http://127.0.0.1:8080/notify", host: "localhost:8000"
172.17.0.1 - - [28/Jul/2020:22:42:32 +0000] "POST /notify HTTP/1.1" 502 494 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
[2020-07-28 22:42:33 +0000] [210] [INFO] Booting worker with pid: 210

Logs since the start if needed (all the POST requests are coming from successful tests):

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.                                                                                                                                     
[s6-init] ensuring user provided files have correct perms...exited 0.                                                                                                                                             
[fix-attrs.d] applying ownership & permissions fixes...                                                                                                                                                           
[fix-attrs.d] done.                                                                                                                                                                                               
[cont-init.d] executing container initialization scripts...                                                                                                                                                       
[cont-init.d] done.                                                                                                                                                                                               
[services.d] starting services                                                                                                                                                                                    
[services.d] done.                                                                                                                                                                                                
Starting gunicorn                                                                                                                                                                                                 
Starting nginx                                                                                                                                                                                                    
2020/07/28 17:53:57 [notice] 197#197: using the "epoll" event method                                                                                                                                              
2020/07/28 17:53:57 [notice] 197#197: nginx/1.19.0
2020/07/28 17:53:57 [notice] 197#197: built by gcc 8.3.0 (Debian 8.3.0-6)
2020/07/28 17:53:57 [notice] 197#197: OS: Linux 4.9.0-12-amd64
2020/07/28 17:53:57 [notice] 197#197: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2020/07/28 17:53:57 [notice] 197#197: start worker processes
2020/07/28 17:53:57 [notice] 197#197: start worker process 198
[2020-07-28 17:53:58 +0000] [183] [INFO] Starting gunicorn 20.0.4
[2020-07-28 17:53:58 +0000] [183] [INFO] Listening at: http://0.0.0.0:8080 (183)
[2020-07-28 17:53:58 +0000] [183] [INFO] Using worker: sync
[2020-07-28 17:53:58 +0000] [201] [INFO] Booting worker with pid: 201
[2020-07-28 17:53:58 +0000] [202] [INFO] Booting worker with pid: 202
[2020-07-28 17:53:58 +0000] [203] [INFO] Booting worker with pid: 203
[2020-07-28 17:53:58 +0000] [204] [INFO] Booting worker with pid: 204
[2020-07-28 17:53:58 +0000] [205] [INFO] Booting worker with pid: 205
[2020-07-28 17:53:58 +0000] [206] [INFO] Booting worker with pid: 206
[2020-07-28 17:53:58 +0000] [207] [INFO] Booting worker with pid: 207
[2020-07-28 17:53:58 +0000] [208] [INFO] Booting worker with pid: 208
[2020-07-28 17:53:59 +0000] [209] [INFO] Booting worker with pid: 209
127.0.0.1 - - [28/Jul/2020:13:00:57 -0500] "GET / HTTP/1.0" 200 25873 "-" "curl/7.52.1"
172.17.0.1 - - [28/Jul/2020:18:00:57 +0000] "GET / HTTP/1.1" 200 25873 "-" "curl/7.52.1" "-"
2020/07/28 18:00:57 [info] 198#198: *1 client 172.17.0.1 closed keepalive connection
127.0.0.1 - - [28/Jul/2020:13:01:05 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:01:06 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:01:14 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:01:14 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:02:09 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:02:09 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:02:12 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:02:12 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:04:52 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:04:52 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:04:57 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:04:57 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:04:59 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:04:59 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:05:11 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:05:11 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:05:12 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:05:12 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:05:13 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"
172.17.0.1 - - [28/Jul/2020:18:05:13 +0000] "POST /notify HTTP/1.1" 200 52 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "-"
127.0.0.1 - - [28/Jul/2020:13:05:15 -0500] "POST /notify HTTP/1.0" 200 21 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"

Can you help please? Thanks in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
nicofrandcommented, Aug 26, 2020

Hi again,

I don’t have the issue right now after several tests (and a docker network change). Just wanted to thank you again:

The latest issue on my side were due to docker not having external network access after a debian upgrade and nftables migration. I am not savvy enough to fix it properly so I passed the --network host parameter but hit another issue: I already have something on port 8080. So I was about to build a new docker without nginx and only gunicorn. And then I saw you already provide such an image ❤️.

0reactions
caronccommented, Aug 20, 2020

You’re honestly not wasting my time; if i have a bug, i definitely want to fix it. I also don’t mind trying to help you out if you find the issue could be on my end 🙂

I’ll close this issue for now, but feel free to re-open it and/or open a new ticket whenever you like! I wish you the best of luck!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gunicorn worker timeout error - Stack Overflow
WORKER TIMEOUT means your application cannot response to the request in a defined amount of time. You can set this using gunicorn timeout...
Read more >
CRITICAL WORKER TIMEOUT when running Flask app #1801
It seems there have been already several reports related to [CRITICAL] WORKER TIMEOUT error but it just keeps popping up. Here is my...
Read more >
How to resolve the gunicorn critical worker timeout error?
If above fix doesn't work, then increase Gunicorn timeout flag in Gunicorn configuration, default Gunicorn timeout is 30 seconds.
Read more >
Settings — Gunicorn 20.1.0 documentation
Workers silent for more than this many seconds are killed and restarted. Value is a positive number or 0. Setting it to 0...
Read more >
Django + Gunicorn CRITICAL WORKER TIMEOUT - Reddit
I have this issue where Gunicorn fails to boot workers and they timeout without serving any request. Increasing the timeout doesn't help.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found