Closed unkcpz closed 3 weeks ago
Ok, I didn't know this would happen. Is the solution robust? I think the best is to make it somehow configurable, as I'm not sure what are the performance implications to change it globally
If I understand correctly, the timeout happens because nohup
return the control too fast that timeout 0.01
set for channel is not enough to make the stdout
read to call read()
function. Is that possible to add a while loop to wait for this ready and put a outside timeout for ending the while loop in case it is not exit?
https://github.com/aiidateam/aiida-core/blob/212f6163b03b8762509ae2230c30172af8c02fed/src/aiida/transports/plugins/ssh.py#L1413-L1414
When using
aiida-hyperqueue
, the commandverdi data hyperqueue server start eiger-mem-hq
will callnohup hq server start 1>$HOME/.hq-stdout 2>$HOME/.hq-stderr &
to start hq server from remote. But I run into the timeout error in the line above. The problem fixed when I increase the timeout from0.01
to0.1
or justtime.sleep(0.1)
beforestdout.read()
. The timeout also happens if the command isnohup ls &
.I guess maybe it is not proper to use
exec_command_wait_bytes
fornohup
? Or either make the channel SSH timeout configurable?Pinning @giovannipizzi I guess you are the author of this part? @mbercx since it is hq related.