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

gunicorn failure on cloud run example #198

Open
guilhem-martin opened this issue Sep 29, 2023 · 9 comments
Open

gunicorn failure on cloud run example #198

guilhem-martin opened this issue Sep 29, 2023 · 9 comments
Assignees

Comments

@guilhem-martin
Copy link

guilhem-martin commented Sep 29, 2023

Hello,

I'm running the search webapp following the readme. The cloud run is successfully built but raises errors when deployed:

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker worker.init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 95, in init_process super().init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi()

The cloud run web page displays "service not available".

I tried several verion of gunicorn through the Dockerfile, but it didn't help.

Any idea?
Thanks.

@ChunKinPS
Copy link

Same here, finding solution as well

@guilhem-martin
Copy link
Author

@ChunKinPS
What I just tried: gunicorn==21.2.0 in the requirements.txt and still 3.11 for python in the Dockerfile.
But still getting the same error.

@ChunKinPS
Copy link

@guilhem-martin I had solved the issue. Simply remove the version for all the dependencies in requirements.txt . For my case, it solved the issue.

@adityaworkfusion
Copy link

adityaworkfusion commented Oct 4, 2023

I am also getting same issue with gunicorn. Basically I have deployed a python gen app on google cloud run with gunicorn version "20.1.0" but its giving me same error as above user are facing. Though with the same gunicorn version I was able to run it earlier on cloud run, please suggest me how I can fix this issue.

below is the error

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker worker.init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 95, in init_process super().init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi()

@ChunKinPS
Copy link

I am also getting same issue with gunicorn. Basically I have deployed a python gen app on google cloud run with gunicorn version "20.1.0" but its giving me same error as above user are facing. Though with the same gunicorn version I was able to run it earlier on cloud run, please suggest me how I can fix this issue.

below is the error

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker worker.init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 95, in init_process super().init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi()

Did u try remove the version in requirements.txt? after I remove the version, I deploy again and the issue solved. I think this is because the version of python and gunicorn causing this issue. There is some conflict over there. I am using python:3.11-slim in my dockerfile as well like you.
image

@adityaworkfusion
Copy link

Thanks, I will try without passing any version, but what's the fix when I have version dependencies for few libraries.

@ChunKinPS
Copy link

ChunKinPS commented Oct 4, 2023

One possible solution is keep trying for different version until you did not see the error, but it is not the best way to fix this.

@hugomiura
Copy link

I got the same error. I also removed all versions from requirements but it nothing changed.

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/gunicorn/arbiter.py", line 609, in spawn_worker worker.init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/gthread.py", line 95, in init_process super().init_process() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/usr/local/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi()

@holtskinner
Copy link
Collaborator

holtskinner commented Nov 29, 2023

@guilhem-martin
https://github.com/GoogleCloudPlatform/generative-ai/blob/main/search/web-app/requirements.txt doesn't have a version for gunicorn or any other library except google-cloud-discoveryengine>=0.11.1.

Have you also set the PROJECT_ID and other config variables to your own values?

And setup a Vertex AI Search app in the project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants