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

Intermittent 500 Internal Server Error due to Premature Child Process Termination in ensure_process #27

Open
Anshuldubey0602 opened this issue Jan 31, 2024 · 0 comments

Comments

@Anshuldubey0602
Copy link

Anshuldubey0602 commented Jan 31, 2024

I am having trouble with dash apps to respond with the Error report from ContainDS Dashboards. I get an intermittent 500 Internal server error instead. I have tried using the --ready-timeout flag hoping that it would help, but no luck. I think that the child process is getting killed before the error could propagate up.

`Traceback (most recent call last):
File "/usr/local/lib64/python3.11/site-packages/tornado/web.py", line 1713, in _execute
result = await result
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/websocket.py", line 102, in get
return await self.http_get(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 849, in http_get
return await self.proxy(self.port, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 843, in proxy
return await self.oauth_proxy(port, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 798, in oauth_proxy
return await self.core_proxy(port, path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 829, in core_proxy
if not await self.ensure_process():
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/jhsingle_native_proxy/proxyhandlers.py", line 762, in ensure_process
await proc.kill()
File "/usr/local/lib/python3.11/site-packages/simpervisor/process.py", line 167, in kill
return await self._signal_and_wait(signal.SIGKILL)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/simpervisor/process.py", line 140, in _signal_and_wait
self.proc.send_signal(signum)
File "/usr/lib64/python3.11/asyncio/subprocess.py", line 140, in send_signal
self._transport.send_signal(signal)
File "/usr/lib64/python3.11/asyncio/base_subprocess.py", line 145, in send_signal
self._check_proc()
File "/usr/lib64/python3.11/asyncio/base_subprocess.py", line 142, in _check_proc
raise ProcessLookupError()```

Expected behavior:
The ensure_process method should capture error details, and allow the exception to propagate up for higher-level exception handling so that the error is appropriately reported instead of terminating the process prematurely, leading to generic 500 Internal Server Errors.

Expected response:
image

Just wanted to see if we can adjust the behavior within the if not is_ready block to let the error handled by the higher level handler? Is there any other solution we could try?

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

1 participant