Alberto_Umana
Databricks Employee
Databricks Employee

It is best practice to restart the cluster regularly correct! Regularly restarting clusters can help mitigate memory leaks and accumulated GC issues.

And about if it happens because of your code, it depends on what you are doing and if you follow best practices, but would need more insights to tell.