What happens if n8n worker crashes?

What about running workflow and nodes? Are them recovered or retried at reboot or after a timeout?

Welcome to the community @alex1!

n8n does currently not have a mechanism to auto retry failed executions. That has to be done manually.

If a workflow times out because it executed longer than the time it was set to, then the workflow will be stopped after the specified time, the execution data saved and the execution marked as failed.

If n8n crashes then by default will the data of all currently active workflows be lost (the only thing not lost would be the initial data like for example incoming Webhook data) unless “Save Execution Progress” got activated globally or on the workflow. Then the progress of the last node would be saved to the database and the execution can get restarted from the last position. This will however also come with the cost of higher memory, CPU and network usage (or Disk IO, depending on what DB gets used) and slower execution because of the constant saving of the execution data after each executed node.

Hope that helps.