I have a simple Ray program that connect with Ray cluster and executes a remote function.
When I run this program from the command line, it works like a charm. However, when this remote function is called from a Django based web app hosted on Apache2 server using mod_wsgi, I get the following error:
“OSError: Apache/mod_wsgi log object is not associated with a file descriptor.”
Here is the stack trace:
[Tue Jan 26 03:59:02.706384 2021] [wsgi:error] [pid 335920:tid 140665254037248] File “/home/venv/table_creator.py”, line 23, in init
[Tue Jan 26 03:59:02.706396 2021] [wsgi:error] [pid 335920:tid 140665254037248] ray.init(address=‘auto’)
[Tue Jan 26 03:59:02.706422 2021] [wsgi:error] [pid 335920:tid 140665254037248] File “/home/venv/lib/python3.8/site-packages/ray/worker.py”, line 766, in init
[Tue Jan 26 03:59:02.706435 2021] [wsgi:error] [pid 335920:tid 140665254037248] connect(
[Tue Jan 26 03:59:02.706461 2021] [wsgi:error] [pid 335920:tid 140665254037248] File “/home/venv/lib/python3.8/site-packages/ray/worker.py”, line 1080, in connect
[Tue Jan 26 03:59:02.706472 2021] [wsgi:error] [pid 335920:tid 140665254037248] faulthandler.enable(all_threads=False)
[Tue Jan 26 03:59:02.706526 2021] [wsgi:error] [pid 335920:tid 140665254037248] OSError: Apache/mod_wsgi log object is not associated with a file descriptor.
Any help how to solve this please?
Thank you.