asked 6 month ago
0
7
I'm running a Python script inside a Conda-based Docker container that processes geospatial data. The script runs a two step GDAL workflow, it uses gdaldem colorrelief to create a colorized GeoTIFF, and gdal2tiles.py to generate map tiles from that result.
Gdaldem completes successfully every time. However, the script hangs indefinitely as soon as it calls gdal2tiles.py... It produces no error output, and surprisingly, even the timeout argument in subprocess.run does not trigger an exception, the whole process just freezes with these log:
The code snippet in question:
What could cause gdal2tiles.py to hang so completely that it ignores the timeout from Python's subprocess module? Is there a known issue with running gdal2tiles.py non interactively from a Python script inside a Docker container that could lead to this kind of deadlock?
Ruled out Environment Path Issues: I added a diagnostic log (shutil.which('gdal2tiles.py')) which confirmed the script is correctly finding the modern version of gdal2tiles.py inside the conda environment (/opt/conda/envs/radar-env/bin/gdal2tiles.py).
Ruled out Multiprocessing: The hang occurs even with the --processes flag removed from the command.
Ruled out output format: The hang persists whether I use --webp-quality=90 or remove it to default to png tiles.
I also tried to replaced subprocess.run with the lower-level subprocess.Popen and proc.communicate(timeout=) this also hung and failed to trigger the TimeoutExpired exception.


The answer board is empty. Make it rain with your brilliant answer.
1
0
0