Task timed out while running geopandas with a 5.0 GB file
0
On my desktop the geopandas kan clip the file within 8-9 seconds while on lambda it is doing taske timed out after 300 seconds. I have even used
shp = gpd.read_file(input_path, bbox=(x-modelsize/2, y-modelsize/2, x+modelsize/2, y+modelsize/2), engine="pyogrio", max_features=20000)
The maximum memory which can be used is set as maximum on lambda. On my desktop it never reaches more than 3 GB.
The task is timing out at 300 seconds which is 5 minutes. Try increasing the Lambda function timeout to 900 seconds / 15 minutes, the longest a Lambda function is allowed to run. I have had similiar issues with Lambda functions using geopandas and ended up having to use libraries such as GDAL directly instead of relying on geopandas due to the constraints of the underlying EC2 instance. Local testing was well under the 15 minute mark however when using the same code via a Docker container deployed to Lambda, it was timing out at 15 minutes.
The task is timing out at 300 seconds which is 5 minutes. Try increasing the Lambda function timeout to 900 seconds / 15 minutes, the longest a Lambda function is allowed to run. I have had similiar issues with Lambda functions using
geopandas
and ended up having to use libraries such asGDAL
directly instead of relying ongeopandas
due to the constraints of the underlying EC2 instance. Local testing was well under the 15 minute mark however when using the same code via a Docker container deployed to Lambda, it was timing out at 15 minutes.