Question

Is there an issue with Celery on App Platform?

Posted May 25, 2021 609 views
DjangoRedisDigitalOcean App Platform

Hi

I have been looking through all the questions, and tutorials for Django and Celery for App Platform but I can’t seem to see anything that is helpful.

The Celery work seems to start, and then dies with a fatal error. I have pasted what is happening below.

If anyone has any ideas that would be most appreciated!

Kind regards,

Error Output

apps@workers-799ccfc99b-qg7bq:~$ celery -A csapi worker -l info

 -------------- celery@workers-799ccfc99b-qg7bq v5.0.5 (singularity)
--- ***** ----- 
-- ******* ---- Linux-4.4.0-x86_64-with-glibc2.27 2021-05-25 19:31:04
- *** --- * --- 
- ** ---------- [config]
- ** ---------- .> app:         csapi:0x2ac9d4dcb250
- ** ---------- .> transport:   redis://:**@159.203.115.161:6379/1
- ** ---------- .> results:     disabled://
- *** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** ----- 
 -------------- [queues]
                .> celery           exchange=celery(direct) key=celery


[tasks]
  . Cancel Expired Options
  . Check Cabin for Release
  . Log API Call
  . Released Cabin
  . csapi.celery.debug_task
  . operations.tasks.resize_image
  . publish.tasks.publish_element

[2021-05-25 19:31:04,464: CRITICAL/MainProcess] Unrecoverable error: OSError(38, 'Function not implemented')
Traceback (most recent call last):
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/worker/worker.py", line 203, in start
    self.blueprint.start(self)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/bootsteps.py", line 116, in start
    step.start(parent)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/bootsteps.py", line 365, in start
    return self.obj.start()
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/concurrency/base.py", line 129, in start
    self.on_start()
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/concurrency/prefork.py", line 107, in on_start
    P = self._pool = Pool(processes=self.limit,
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/concurrency/asynpool.py", line 460, in __init__
    super().__init__(processes, *args, **kwargs)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/pool.py", line 1046, in __init__
    self._create_worker_process(i)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/celery/concurrency/asynpool.py", line 477, in _create_worker_process
    return super()._create_worker_process(i)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/pool.py", line 1142, in _create_worker_process
    on_ready_counter = self._ctx.Value('i')
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/context.py", line 181, in Value
    return Value(typecode_or_type, *args, lock=lock,
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/sharedctypes.py", line 83, in Value
    lock = ctx.RLock()
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/context.py", line 110, in RLock
    return RLock(ctx=self.get_context())
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/synchronize.py", line 207, in __init__
    SemLock.__init__(self, RECURSIVE_MUTEX, 1, 1, ctx=ctx)
  File "/workspace/.heroku/python/lib/python3.9/site-packages/billiard/synchronize.py", line 71, in __init__
    sl = self._semlock = _billiard.SemLock(
OSError: [Errno 38] Function not implemented
edited by MattIPv4
1 comment
  • Hey there!

    Are you starting this worker on at least a 1gb RAM container? Celery tends to crash like this if it is running on the smaller app platform sizes as it needs at least 1gb of RAM.

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
2 answers

Hi

Thanks for taking the time to respond.

Yes, I have tried it on a 2gb container as well but no luck with that either.

Hey there,

Thanks for that info. Looking into this further it looks like Celery uses multiprocessing pools that use a syscall that is not supported by App Platform at this time. However this is something that we are working on and will be addressing soon. Unfortunately there is no ETA that I can share.

  • Is there anyway to receive an update about when this has been resolved? This is currently preventing me from moving my django and celery app to DO app platform.