Large and long-running functions can cause unexpected timeout issues and A function can become large because of many Node.js dependencies. Specially Importing dependencies can also cause increased load times that result in unexpected timeouts.
Whenever possible, we should refactor large functions into smaller function sets that work together and return responses fast.