Nimesh Kumar
04/26/2024, 4:03 PM15:58:05.322 | INFO | prefect.agent - Reported flow run 'dfc9e73f-e303-4068-9bc9-6b8d8fec51da' as crashed: Flow run infrastructure exited with non-zero status code 143.
Hi everyone, can anyone please explain why this flow crashedNate
04/26/2024, 4:07 PMNimesh Kumar
04/26/2024, 4:27 PMNate
04/26/2024, 4:31 PMNimesh Kumar
04/26/2024, 4:32 PMNimesh Kumar
04/26/2024, 4:33 PMNimesh Kumar
04/26/2024, 4:37 PMThe code 143 indicates that the pod was terminated gracefully by the signal SIGTERM.
Pod may be terminated if it exceeds its allocated resources such as CPU or Memory
and the Kubernetes cluster needs to reclaim those resources. In this case, Kubernetes sends a SIGTERM signal to the pod to allow it to clean up before termination.
If your application within the pod is crashing or encountering issues, it might terminate itself or be terminated by Kubernetes. In such cases, Kubernetes sends a SIGTERM signal to initiate a graceful shutdown.
Got this while searching, Is it a resource issue which results in the crashingNimesh Kumar
04/27/2024, 2:30 PMMessage: Pod ephemeral local storage usage exceeds the total limit of containers 1Gi.
Can you help what can i do to avoid thisNate
04/27/2024, 2:32 PMresources:
limits:
ephemeral-storage: 2Gi
Nimesh Kumar
04/27/2024, 2:36 PMNate
04/27/2024, 2:38 PMNimesh Kumar
04/27/2024, 2:39 PMNate
04/27/2024, 2:42 PMNate
04/27/2024, 2:43 PMMarvin
04/27/2024, 2:44 PM--storage-block
flag, Prefect defaults to a LocalFileSystem block, which utilizes your current working directory as its basepath. This option is typically not suited for Kubernetes deployments where the local file system of other machines isn't accessible.
- Preconfigured Storage Blocks: You can preconfigure a storage block (for example, cloud storage options) to be used with your deployments. This provides more flexibility when running workflows across different environments.
Since you're asking about Kubernetes local ephemeral storage, keep in mind that Prefect does not detail specifics on configuring Kubernetes storage specifics, such as ephemeral storage, within its documentation.
For more detailed information please refer to Prefect's documentation on storage and the Kubernetes deployment guide.
As the information on Kubernetes local ephemeral storage is quite dated (pre 2021), you might find more current practices and configurations by directly consulting Kubernetes' own documentation or community-driven resources. Ephemeral storage is typically managed through Kubernetes itself and configuring it might not be directly related to Prefect's storage configuration.Nate
04/27/2024, 2:44 PMMarvin
04/27/2024, 2:45 PMemptyDir
volumes. An emptyDir
volume is created when a pod gets assigned to a node and exists as long as that pod is running on that node.
- Resource Scheduling: When scheduling pods, Kubernetes will take into account the storage requirements specified in the pod specification to ensure that nodes have sufficient storage for the pod's needs.
- Limits and Requests: Similar to CPU and memory, Kubernetes allows you to specify requests and limits for storage. Requests guarantee a minimum amount of ephemeral storage for the pod, and limits ensure a pod does not exceed a specified amount of storage.
Local ephemeral storage is not suitable for any data that must be retained across pod restarts, crashes, or deletions. For persistent storage needs, Kubernetes offers a PersistentVolume subsystem that provides an API for users and administrators that abstracts details of how storage is provided and how it is consumed.
More detailed information can be found in the Kubernetes documentation on ephemeral storage.Nimesh Kumar
04/27/2024, 2:46 PMMike Logaciuk
04/29/2024, 7:03 AM