Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose "web" service fails to reload on code changes #6578

Closed
yeraydiazdiaz opened this issue Sep 4, 2019 · 6 comments · Fixed by #6579 or #7527
Closed

Docker compose "web" service fails to reload on code changes #6578

yeraydiazdiaz opened this issue Sep 4, 2019 · 6 comments · Fixed by #6579 or #7527
Labels
developer experience Anything that improves the experience for Warehouse devs

Comments

@yeraydiazdiaz
Copy link
Contributor

Recently I've been noticing the reloading of the web service errors forcing me to restart the docker compose service. Has anyone else experienced this?

Hupper enters a cycle where it can't bind to the port because it is already in use. Here are the logs:

web_1            | [2019-09-04 09:31:05 +0000] [16] [INFO] Worker exiting (pid: 16)
web_1            | Server did not exit, forcefully killing.
web_1            | Starting monitor for PID 17.
web_1            | {"logger": "raven.base.Client", "level": "INFO", "event": "Raven is not configured (logging is disabled). Please see the documentation for more information.", "thread": 140079147017984}
web_1            | [2019-09-04 09:31:31 +0000] [17] [INFO] Starting gunicorn 19.9.0
web_1            | [2019-09-04 09:31:31 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2019-09-04 09:31:31 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2019-09-04 09:31:32 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2019-09-04 09:31:32 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2019-09-04 09:31:33 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2019-09-04 09:31:33 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2019-09-04 09:31:34 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2019-09-04 09:31:34 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2019-09-04 09:31:35 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2019-09-04 09:31:35 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2019-09-04 09:31:36 +0000] [17] [ERROR] Can't connect to ('0.0.0.0', 8000)
web_1            | Press ENTER or change a file to reload.
web_1            | Traceback (most recent call last):
web_1            |   File "<string>", line 1, in <module>
web_1            |   File "/opt/warehouse/lib/python3.7/site-packages/hupper/ipc.py", line 318, in spawn_main
web_1            |     func(**kwargs)
web_1            |   File "/opt/warehouse/lib/python3.7/site-packages/hupper/worker.py", line 263, in worker_main
web_1            |     func(*spec_args, **spec_kwargs)
web_1            |   File "/opt/warehouse/lib/python3.7/site-packages/hupper/reloader.py", line 285, in wait_main
web_1            |     input('')
web_1            | EOFError: EOF when reading a line
web_1            | Starting monitor for PID 30.

... repeats endlessly...
@yeraydiazdiaz yeraydiazdiaz added the developer experience Anything that improves the experience for Warehouse devs label Sep 4, 2019
@di
Copy link
Member

di commented Sep 4, 2019

I've noticed this too. Thanks for filing an issue about it!

@yeraydiazdiaz
Copy link
Contributor Author

This is happening again but the output is different:

web_1            | /opt/warehouse/src/warehouse/search/queries.py changed; reloading ...
web_1            | Gracefully killing the server.
web_1            | [2020-02-26 20:51:14 +0000] [9] [INFO] Handling signal: term
web_1            | [2020-02-26 20:51:14 +0000] [16] [INFO] Worker exiting (pid: 16)
web_1            | Server did not exit, forcefully killing.
web_1            | Starting monitor for PID 17.
web_1            | {"logger": "raven.base.Client", "level": "INFO", "event": "Raven is not configured (logging is disabled). Please see the documentation for more information.", "thread": 139630094440192}
web_1            | [2020-02-26 20:51:32 +0000] [17] [INFO] Starting gunicorn 20.0.4
web_1            | [2020-02-26 20:51:32 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)                                                                                                                                              web_1            | [2020-02-26 20:51:32 +0000] [17] [ERROR] Retrying in 1 second.
web_1            | [2020-02-26 20:51:33 +0000] [17] [ERROR] Connection in use: ('0.0.0.0', 8000)
web_1            | [2020-02-26 20:51:33 +0000] [17] [ERROR] Retrying in 1 second.

@yeraydiazdiaz yeraydiazdiaz reopened this Feb 26, 2020
@di
Copy link
Member

di commented Feb 26, 2020

I thought #7404 might resolve this (the changelog looks promising) but I'm still seeing this as well.

@di
Copy link
Member

di commented Feb 27, 2020

I'm also still experiencing this with versions of hupper that used to work.

@di
Copy link
Member

di commented Mar 2, 2020

@yeraydiazdiaz Looks like hupper made a new release which might solve this: #7479

@di
Copy link
Member

di commented Mar 10, 2020

The new hupper release did not seem to solve this. Downgrading to gunicorn 19.x did not resolve it either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer experience Anything that improves the experience for Warehouse devs
Projects
None yet
2 participants