We are running some gradle tasks and one of the task takes more than 16 minutes. In such cases, gradle do not wait for task to be completed in background (database inserts) and shows the message after 15 min 34 secs that task is completed. However, in actual, background task was not completed but gradle moves on to next task given.
Is there any timeout configuration for gradle task? what could be the possible cause and solution for this issue?
Gradle itself doesn’t have tasks that perform database inserts and wouldn’t arbitrarily background and detach from the action of a task after some amount of time. Either you’ve written code to do this or you’re using and configuring a plugin that has written code to do that. You haven’t provided any implementation details about the relevant parts of your build script though.
Gradle itself is not just arbitrarily giving up on executing a task after 15 min 34 sec. If you’re seeing this consistently at this exact amount of time, something in your build or environment would be causing this specific behavior. A task will run indefinitely unless its implementation specifically does otherwise or something else interferes and there’s still not enough information here to guess what is occurring in your build (i.e. I can easily create a task that will run for far longer, even days).