Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Reader raises a ProgrammingError #13

Open
cmft opened this issue Nov 13, 2018 · 1 comment
Open

Reader raises a ProgrammingError #13

cmft opened this issue Nov 13, 2018 · 1 comment

Comments

@cmft
Copy link
Contributor

cmft commented Nov 13, 2018

Time to time the reader (configured to use hdbpp) raises the bellow error during get_attribute_values calls.
e.g.

attr_name = 'sys/tg_test/1/double_scalar'
t0 = '1541684831.979' #8 Nov
t1 = '1541781662.979' #9 Nov
get_attribute_values(attr_name, t0, t1, decimate=True)
TimerLoop 1    WARNING  2018-11-13 08:30:05,412 tlarf01.cells.es:10000.hdbpp:   Decimated sys/tg_test/1/double_scalar[301 > 301] in 0.000423908233643 s
Traceback (most recent call last):
  File "/home/cfalcon/tools/fandango/fandango/db.py", line 133, in getCursor
    self._cursor.close()
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 100, in close
    while self.nextset(): pass
  File "build/bdist.linux-x86_64/egg/MySQLdb/cursors.py", line 132, in nextset
    nr = db.next_result()
ProgrammingError: (2014, "Commands out of sync; you can't run this command now")
@cmft cmft changed the title Reader raise a ProgrammingError Reader raises a ProgrammingError Nov 13, 2018
@cmft
Copy link
Contributor Author

cmft commented Nov 13, 2018

Even sometimes you get core dump and other times this trace:

TimerLoop 1    WARNING  2018-11-13 08:42:15,382 tlarf01.cells.es:10000.hdbpp: In PyTangoArchiving.Reader.get_attribute_values(hdbrf,sys/tg_test/1/double_scalar,2018-11-08 14:47:11,2018-11-09 17:41:02)
MainThread     WARNING  2018-11-13 08:42:15,394 tlarf01.cells.es:10000.hdbpp: In PyTangoArchiving.Reader.get_attribute_values(hdbrf,sys/tg_test/1/double_scalar,2018-11-08 14:47:11,2018-11-09 17:41:02)
HDBpp   ERROR 2018-11-13 08:42:15.395: Unable to create a MySQLdb connection to "manager"@tlarf01.hdbrf: db
Query(select data_type from att_conf_data_type where att_conf_data_type_id = 38) failed!
get_attribute_values(*(<PyTangoArchiving.hdbpp.config.HDBpp object at 0x7f1780152210>, 'sys/tg_test/1/double_scalar', '2018-11-08 14:47:11', '2018-11-09 17:41:02'),**{'unixtime': True, 'N': 0}) failed!
TimerLoop 1    INFO     2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp:   Query(sys/tg_test/1/double_scalar,2018-11-08 14:47:11,2018-11-09 17:41:02,False,0) = [301] in 0.0141079425812 s
TimerLoop 1    INFO     2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp:   Parsed [301] in 8.70227813721e-05 s
TimerLoop 1    WARNING  2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp: Removed 0 (None,NaN, Rep) values in 0.000077s
TimerLoop 1    WARNING  2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp: Removed 0 (None,NaN, Rep) values in 0.000266s
TimerLoop 1    WARNING  2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp: Decimation is not callable
TimerLoop 1    WARNING  2018-11-13 08:42:15,398 tlarf01.cells.es:10000.hdbpp:   Decimated sys/tg_test/1/double_scalar[301 > 301] in 0.000577211380005 s
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/utils.py", line 113, in execute
    return self.f(*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/hdbpp/config.py", line 682, in get_attribute_values
    aid,tid,table = self.get_attr_id_type_table(table)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/hdbpp/config.py", line 563, in get_attr_id_type_table
    +"where att_conf_data_type_id = %s"%tid)[0][0]
  File "/home/cfalcon/tools/fandango/fandango/db.py", line 183, in Query
    self.renewMySQLconnection()
  File "/home/cfalcon/tools/fandango/fandango/db.py", line 119, in renewMySQLconnection
    raise Exception,e
AttributeError: db

Traceback (most recent call last):
  File "test_arch_plot.py", line 32, in <module>
    c.setXModel(modelx)
  File "/usr/lib/python2.7/dist-packages/taurus_pyqtgraph/taurusplotdataitem.py", line 68, in setXModel
    self.xModel = Attribute(xModel)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/taurushelper.py", line 299, in Attribute
    return Factory(scheme=getSchemeFromName(dev_or_attr_name)).getAttribute(dev_or_attr_name)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/evaluation/evalfactory.py", line 200, in getAttribute
    a = EvaluationAttribute(fullname, parent=dev, **kwargs)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/evaluation/evalattribute.py", line 184, in __init__
    trstring, ok = self.preProcessTransformation(trstring)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/evaluation/evalattribute.py", line 259, in preProcessTransformation
    symbol = self.__ref2Id(r)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/evaluation/evalattribute.py", line 291, in __ref2Id
    refobj = self.__createReference(ref)
  File "/home/cfalcon/tools/taurus.git/lib/taurus/core/evaluation/evalattribute.py", line 309, in __createReference
    v = refobj.read().rvalue
  File "/home/cfalcon/tools/archiving-scheme/archiving/archivingattribute.py", line 97, in read
    self._end_date, decimate=True)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/reader.py", line 986, in get_attribute_values
    asHistoryBuffer, N, notNone, GET_LAST)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/reader.py", line 1068, in get_attribute_values_from_db
    N=N,unixtime=True)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/utils.py", line 96, in __call__
    return self.execute(*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/utils.py", line 113, in execute
    return self.f(*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/hdbpp/config.py", line 682, in get_attribute_values
    aid,tid,table = self.get_attr_id_type_table(table)
  File "/usr/lib/python2.7/dist-packages/PyTangoArchiving/hdbpp/config.py", line 563, in get_attr_id_type_table
    +"where att_conf_data_type_id = %s"%tid)[0][0]
  File "/home/cfalcon/tools/fandango/fandango/db.py", line 183, in Query
    self.renewMySQLconnection()
  File "/home/cfalcon/tools/fandango/fandango/db.py", line 119, in renewMySQLconnection
    raise Exception,e
AttributeError: db

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant