Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Win32: temporary files attempted to be removed before process completed, causing 'The process cannot access the file because it is being used by another process' error #68

Open
rdewit opened this issue Jun 28, 2023 · 0 comments
Labels

Comments

@rdewit
Copy link

rdewit commented Jun 28, 2023

Description

On Windows Server 2019, the current version (v1.7.1) causes the data in the requested output format to have 0 bytes and have errors in the server log.

Context

It appears that the plugin tries to remove the temporary files before the process is completed. This results in the following error: The process cannot access the file because it is being used by another process.

The problem goes away when the env var DEBUG_WFSOUTPUTEXTENSION is set to 1 but this is undesirable in the long term as temporary files would never be removed.

We run QGIS Server as FastCGI on IIS.

A more complete log output:

15:06:15 INFO WfsOutputExtension[8448]: WFS request to get format CSV
15:06:15 INFO WfsOutputExtension[8448]: Fetching XSD : HTTP code 200, request ?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=Features_of_Interest_-_Polygons&OUTPUT=XMLSCHEMA
15:06:15 INFO WfsOutputExtension[8448]: xsd_for_layer ran in 0.0s
15:06:15 INFO WfsOutputExtension[8448]: Temporary GML file is C:\Windows\Temp\QGIS_WfsOutputExtension\gml_features_1684299974.5488436.gml|option:FORCE_SRS_DETECTION=YES
15:06:15 INFO WfsOutputExtension[8448]: Temporary csv file is C:/Windows/Temp/QGIS_WfsOutputExtension/to-csv-VkLONr.csv
15:06:15 INFO WfsOutputExtension[8448]: Sending the output file
15:06:15 INFO WfsOutputExtension[8448]: send_output_file ran in 0.17s
15:06:15 WARNING [8448]: Cannot send error after headers written
15:06:15 CRITICAL Server[8448]: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Windows\\Temp\\QGIS_WfsOutputExtension\\gml_features_1684299974.5488436.gml'
  • QGIS Server FULL version (with 3 numbers) : v3.28.4
  • OS on the server : Windows Server 2019 Datacenter
@rdewit rdewit added the bug label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant