Closed KevinKao809 closed 5 years ago
Is this log from the Edge Agent? It looks like the Edge Hub is failing and the Edge Agent is trying to restart it. The Edge Agent uses an exponential backoff when restarting. I believe this is currently capped at 5 minutes. The backoff schedule isn't currently configurable.
Is it possible to see the Edge Hub logs to understand why it is failing?
Right, the logs come from edgeAgent, and delay start from 1:20, 2:40 and capped at 5 mins. We implemented device reboot features, and find this delay pattern after couple times reboot testing.
One issue reported here is that we do execute 'iotedge stop' command during reboot process, sometime, we can see the edgeHub change status to 'stopped', but sometime become 'failed'. For our expectation, the delay pattern shall not happen when device normal reboot, that is why we are asking anyhow to disable it.
It is not possible to configure the backoff when restarting. If you can please share edgeHub logs when status is failed it would be helpful to identity why it gets into the backoff restart.
Hello, Below are step and log file about this case.
run systemctl restart iotedge waiting all module start and running repeat above step 10 times then, we can see the edgeHub be delay start up to 5 mins.
@KevinKao809,
When iotedge is restarted all modules get restarted and if the restart is repeated in a short period of time the restart delay will keep increasing. This is expected behavior. You can configure IntensiveCareTimeInMinutes by adding the env variable to edgeAgent, default value is 10 minutes. This value means how long the module has to be running before the delay is cleared.
As I understand from your description this is for testing environment, in a production environment restarting the device so often sounds like an issue with the device and that should be fixed first instead of configuring the modules to restart without backoff.
Hi Ancaantochi, Thanks your reply. Beside edgeHub delay start issue, we also found that when custom module connect to edgeHub, but edgeHub is not ready, custom module will delay by an exponential interval. May I know any way to let edgeAgent start edgeHub first before other modules?
@ancaantochi ,
I set IntensiveCareTimeInMinutes to 0 and 1, but doen't change any thing, I still saw the edgeHub be delay start from 1:20, 2:40 to 5 min. BTW, we found how to adjust exponential interval of custom module.
Hi, You can close this issue now. We understood the behavior is by design, and now no option to adjust the time.
Any way to adjust edgeHub restart delay in 5 mins?
Expected Behavior
Current Behavior
2019-06-14 00:57:19.556 +00:00 [INF] - Module 'edgeHub' scheduled to restart after 05m:00s (04m:18s left).
Steps to Reproduce
1. 2. 3. 4.
Context (Environment)
Output of
iotedge check --output json
Click here
```json // Paste here ```Device (Host) Operating System
Architecture
Container Operating System
Runtime Versions
iotedged
Edge Agent
Edge Hub
Docker
Logs
iotedged logs
```edge-agent logs
```edge-hub logs
```Additional Information