Question

Created docker container wont start on AppPlatform

Posted August 15, 2021 157 views
DockerFlask

Hey, I deploy my project on App Platform via GitHub, it finds the Dockerfile, on my localhost, everything works ok. Unfortunately, after building the project on App Platform the runtime logs continuously show this:

[back-cany] [2021-08-15 13:28:42] [2021-08-15 13:28:42 +0000] [1] [INFO] Starting gunicorn 20.1.0
[back-cany] [2021-08-15 13:28:42] [2021-08-15 13:28:42 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1)
[back-cany] [2021-08-15 13:28:42] [2021-08-15 13:28:42 +0000] [1] [INFO] Using worker: sync
[back-cany] [2021-08-15 13:28:42] [2021-08-15 13:28:42 +0000] [3] [INFO] Booting worker with pid: 3
[back-cany] [2021-08-15 13:28:42] [2021-08-15 13:28:42 +0000] [4] [INFO] Booting worker with pid: 4
[back-cany] [2021-08-15 13:28:47] [2021-08-15 13:28:47 +0000] [4] [ERROR] Exception in worker process
[back-cany] [2021-08-15 13:28:47] Traceback (most recent call last):
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
[back-cany] [2021-08-15 13:28:47]     worker.init_process()
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 142, in init_process
[back-cany] [2021-08-15 13:28:47]     self.run()
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 125, in run
[back-cany] [2021-08-15 13:28:47]     self.run_for_one(timeout)
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/sync.py", line 62, in run_for_one
[back-cany] [2021-08-15 13:28:47]     self.notify()
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base.py", line 75, in notify
[back-cany] [2021-08-15 13:28:47]     self.tmp.notify()
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/workertmp.py", line 46, in notify
[back-cany] [2021-08-15 13:28:47]     os.fchmod(self._tmp.fileno(), self.spinner)
[back-cany] [2021-08-15 13:28:47] PermissionError: [Errno 1] Operation not permitted
[back-cany] [2021-08-15 13:28:47] [2021-08-15 13:28:47 +0000] [4] [INFO] Worker exiting (pid: 4)
[back-cany] [2021-08-15 13:28:47] [2021-08-15 13:28:47 +0000] [3] [ERROR] Exception in worker process
[back-cany] [2021-08-15 13:28:47] Traceback (most recent call last):
[back-cany] [2021-08-15 13:28:47]   File "/usr/local/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker

Do you guys have any idea what is going on?

edited by bobbyiliev

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
3 answers

Hello,

There was a similar problem reported here:

https://github.com/steamcmd/api/issues/24

The fix reported there was to update the Dockerfile, ENTRYPOINT and CMD to:

ENTRYPOINT [ "/bin/bash", "-l", "-c" ]
CMD ["gunicorn --workers $WORKERS --threads $THREADS --timeout $TIMEOUT --bind :$PORT run:app"]

Let me know how it goes!
Regards,
Bobby

I am also having this error and its driving me nuts.

The dockerfile runs perfectly locally but the minute I attempt to push to the Digital Ocean Apps Platform, it starts repeating like this.

No idea what’s up. Same conditions as you.

The solution suggested can’t apply to me because I’m pulling an “ENTRYPOINT” and the command didn’t work for most people in that github thread.

Also, i found this in the sample apps doc: limits