3liz / qgis-wfsOutputExtension

QGIS Server plugin to add Output Formats to WFS GetFeature request.
GNU General Public License v2.0
10 stars 6 forks source link

Temporary space not left after not enought space error #37

Closed Niarolf closed 2 years ago

Niarolf commented 2 years ago

Description

When we have not enought space in the apache temp filesystem, the temporary files are not deleted.

Context

Qgis server is using with apache2 and fcgi. The plugin variable debug is with the false value When we call the plugin for a large file, send with a SHP outputFormat for example, the plugin create a gml file, then he converts this one in shp and finally in a zip file. All theses files are deleted when no error and the final file is send, but when an error is occuring, the plugin stop, send a partial file and don't delete the temporary files. We must delete manually.

Gustry commented 2 years ago

Do you have the Python error which occurred ?

Niarolf commented 2 years ago

@Gustry Voici un extrait de l'erreur que j'ai dans le log qui semble être lié à OGR : 11:21:04 WARNING OGR[58278]: Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 21992 bytes to .shp file: Aucun espace disponible sur le périphérique) 11:21:04 WARNING OGR[58278]: Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 16200 bytes to .shp file: Aucun espace disponible sur le périphérique) 11:21:04 CRITICAL WfsOutputExtension[58278]: Feature write errors: Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 63592 bytes to .shp file: Aucun espace disponible sur le périphérique) Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 8520 bytes to .shp file: Aucun espace disponible sur le périphérique) Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 68408 bytes to .shp file: Aucun espace disponible sur le périphérique)

Le fichier renvoyé au client est vide : image

Voici des informations avec le mode debug du plugin mais qui ne semble pas apporter d'autres éléments : Feature creation error (OGR error: Error in psSHP->sHooks.FWrite() while writing object of 16104 bytes to .shp file: Aucun espace disponible sur le périphérique)Stopping after 1001 errors 11:29:09 INFO WfsOutputExtension[60299]: send_output_file ran in 105.1s 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/gml_features_1646907869.384948.gfs 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.dbf 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.shp 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.cpg 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/gml_features_1646907869.384948.gml 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.shx 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.qpj 11:29:09 INFO WfsOutputExtension[60299]: DEBUG_WFSOUTPUTEXTENSION is on, not removing /tmp/QGIS_WfsOutputExtension/to-shp-mwLZSE.prj 11:29:09 INFO WfsOutputExtension[60299]: responseComplete ran in 105.1s 11:29:09 INFO Server[60299]: Request finished in 280528 ms

Gustry commented 2 years ago

Please try the next version, files should always be removed in case of an exception.