Error deploying ver 0.14.3 on DigitalOcean Apps Platform
After upgrading from ver. 0.11.2 to 0.14.3, my application container does not start on DO Apps with the following error:
Traceback (most recent call last):
File "/usr/local/bin/hypercorn", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/hypercorn/__main__.py", line 287, in main
run(config)
File "/usr/local/lib/python3.8/site-packages/hypercorn/run.py", line 52, in run
shutdown_event = ctx.Event()
File "/usr/local/lib/python3.8/multiprocessing/context.py", line 93, in Event
return Event(ctx=self.get_context())
File "/usr/local/lib/python3.8/multiprocessing/synchronize.py", line 324, in __init__
self._cond = ctx.Condition(ctx.Lock())
File "/usr/local/lib/python3.8/multiprocessing/context.py", line 68, in Lock
return Lock(ctx=self.get_context())
File "/usr/local/lib/python3.8/multiprocessing/synchronize.py", line 162, in __init__
SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
File "/usr/local/lib/python3.8/multiprocessing/synchronize.py", line 57, in __init__
sl = self._semlock = _multiprocessing.SemLock(
OSError: [Errno 38] Function not implemented
Maybe we can't spawn on these kind of environments? I find a similar issue in AWS Lambda: https://stackoverflow.com/questions/34005930/multiprocessing-semlock-is-not-implemented-when-running-on-aws-lambda
Any information would be welcome.
Just checked that DO Apps Platform does not give support for multiprocessing module. So this change made Hypercorn incompatible.
With 14.5 you can set workers to 0, see 662ffa952331e0e0696010624e3738dec0d855fb. I think this would then work on Digital Ocean, please let me know if it does/doesn't.