[gdal-dev] OGR2OGR WFS HTTP 504 but no ERRORLEVEL

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[gdal-dev] OGR2OGR WFS HTTP 504 but no ERRORLEVEL

Rob L

Hi there,


Currently we have a process that loads data from an external WFS into Postgres from a nightly scheduled batch file on a Windows box.  Usually works fine and it reports on any errors that it encounters.  But recently we’ve been getting an HTTP 504 error and no features are written but the resultant ERRORLEVEL is still 0.


We’ve contacted the provider to hopefully resolve the error, but we were wondering why ogr2ogr isn’t raising the ERRORLEVEL?


Currently using: GDAL 2.2.2


The WFS URL is:



The layer name is:



Here’s the metadata


A layer that works from the same service as an example is below:




Command we’re running is like:

ogr2ogr -append -f PostgreSQL %POSTGRES_CONNECTION% "WFS:http://environment.data.gov.uk/ds/wfs?SERVICE=WFS&INTERFACE=ENVIRONMENTWFS--0896250c-3aaa-43e2-b783-a133522cb5e3&VERSION=1.0.0" ne_wfs_crow_act_2000_access_layer_england -nln %POSTGRES_DESTINATION_TABLE% -preserve_fid --config OGR_TRUNCATE YES


Running the command manually gives the below error messages:

ERROR 1: HTTP error code : 504

ERROR 1: Error returned by server : HTTP error code : 504 (0)


(And with --debug ON you can find out “GDALVectorTranslate: 0 features written in layer


But the %ERRORLEVEL% = 0


Could anyone advise if this a bug, or if not how we can detect such errors?


Many thanks,





DISCLAIMER: The information contained in this communication/message from [hidden email] sent on Tue Oct 10 10:58:39 2017 is confidential. It is intended solely for the addressee(s) [hidden email]

Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.
As a public body, Salford City Council may be required to disclose this email [or any response to it] under the Freedom of Information Act 2000, unless the information in it is covered by one of the exemptions in the Act.
Please immediately contact the sender, [hidden email] if you have received this message in error.

For the full disclaimer please access http://www.salford.gov.uk/e-mail.  Thank you.

gdal-dev mailing list
[hidden email]