Kegbot / kegbot-server

Kegbot Server, the internet beer kegerator monitoring system.
https://docs.kegbot.org/projects/kegbot-server/
MIT License
194 stars 103 forks source link

Increment gevent version #418

Closed mattforscale closed 3 years ago

mattforscale commented 3 years ago

I'm unable to start the latest Docker image on Raspberry Pi 4 due to the following error:

kegbot_1 | [2021-07-04 20:36:51 +0000] [16] [ERROR] Exception in worker process kegbot_1 | Traceback (most recent call last): kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker kegbot_1 | worker.init_process() kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/ggevent.py", line 160, in init_process kegbot_1 | self.patch() kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/ggevent.py", line 53, in patch kegbot_1 | monkey.patch_all() kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/monkey.py", line 1222, in patch_all kegbot_1 | patch_thread(Event=Event, _warnings=_warnings) kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/monkey.py", line 195, in ignores kegbot_1 | return func(*args, **kwargs) kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/monkey.py", line 754, in patch_thread kegbot_1 | gevent_threadingmod, = _patch_module('threading', kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/monkey.py", line 443, in _patch_module kegbot_1 | gevent_module, target_module, target_module_name = _check_availability(name) kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/monkey.py", line 429, in _check_availability kegbot_1 | gevent_module = getattr(import('gevent.' + name), name) kegbot_1 | File "", line 1004, in _find_and_load kegbot_1 | File "", line 158, in enter kegbot_1 | File "", line 97, in acquire kegbot_1 | File "src/gevent/_semaphore.py", line 273, in gevent._gevent_c_semaphore.Semaphore.enter kegbot_1 | File "src/gevent/_semaphore.py", line 274, in gevent._gevent_c_semaphore.Semaphore.enter kegbot_1 | File "src/gevent/_semaphore.py", line 175, in gevent._gevent_c_semaphore.Semaphore.acquire kegbot_1 | File "/usr/local/lib/python3.9/site-packages/gevent/thread.py", line 121, in acquire kegbot_1 | acquired = BoundedSemaphore.acquire(self, blocking, timeout) kegbot_1 | File "src/gevent/_semaphore.py", line 175, in gevent._gevent_c_semaphore.Semaphore.acquire kegbot_1 | File "src/gevent/_semaphore.py", line 200, in gevent._gevent_c_semaphore.Semaphore.acquire kegbot_1 | OverflowError: Python int too large to convert to C long kegbot_1 | [2021-07-04 20:36:51 +0000] [16] [INFO] Worker exiting (pid: 16)

Based on this link, it appears a fix was implemented in 20.12.1. This pull request just uses a newer version of gevent. I have only tested this on Raspberry Pi 4 which seems to fix the issue.

mik3y commented 3 years ago

Hey @mattforscale! Thanks much for pursuing a fix.

Usually a package update will cause quite a few additional diffs in poetry.lock. (Various checksums and often dependencies get updates too).

Can you try running poetry update gevent and see if it makes further updates to the file? If so, please add those to the PR (amend previous commit and force push; or just push an additional commit).

mattforscale commented 3 years ago

Good call. Done

mik3y commented 3 years ago

Thanks!