ArtesiaWater / hydropandas

Module for loading observation data into custom DataFrames
https://hydropandas.readthedocs.io
MIT License
56 stars 11 forks source link

Sometimes I get an invalid response when calling `_get_gmw_from_bro_id` #228

Closed OnnoEbbens closed 4 months ago

OnnoEbbens commented 4 months ago

When I run

from hydropandas.io import bro
bro._get_gmw_from_bro_id(bro_id = 'GMW000000020882')

I get the following invalid response about 20% of the time. When I retry I get a valid response.

'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><string xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:brocom="http://www.broservices.nl/xsd/brocommon/3.0" xmlns:gmwcommon="http://www.broservices.nl/xsd/gmwcommon/1.1" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ns6="http://www.broservices.nl/xsd/dsgmw/1.1">{\n "valid" : false,\n "xmlValidationErrors" : [ "ORA-17800: Got minus one from a read call. (CONNECTION_ID=BwPotHlsQuOs4Wnz1k9/yw==)\\nhttps://docs.oracle.com/error-help/db/ora-17800/" ],\n "broErrors" : [ ]\n}</string>'

OnnoEbbens commented 4 months ago

According to this post it is most likely that there are too many open connections to the database service. I build in an automatic retry now but this might become harder in the future.

OnnoEbbens commented 4 months ago

fixed for now by retrying automatically