Opened 7 years ago
Last modified 7 years ago
#26 new defect
mysql connection lost after long-time transfer
| Reported by: | zhangjr | Owned by: | somebody |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | BL18auto | Version: | |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Parent ID: | Parent Tickets: | ||
| Estimated Number of Hours: | 0.0 | Add Hours to Ticket: | 0 |
| Billable?: | yes | Total Hours: | 0 |
Description
The big data size around 200GB of GPPD cause new issue. It takes hours to transfer data to CC, when the token is invalid.
Subtickets (add)
Change History (2)
comment:1 Changed 7 years ago by zhangjr
comment:2 Changed 7 years ago by zhangjr
def queryDb(self, runNo):
runString=getRunString(runNo)
try:
_tmp = self.session.query(record).filter_by(run=runString).first()
_success1=True
except:
_tmp=None
print "Mysql query failed"
_success1=False
if not _success1:
try:
self.openRemoteDb()
_tmp = self.session.query(record).filter_by(run=runString).first()
_success2=True
except:
_tmp=None
print "Mysql query failed"
_success2=False
_success = _success1 or _success2
if _tmp is not None:
_result=_tmp.stat
else:
_result=-1
return _success, _result

When querying the database failed, retry to build the new seesion, self.session = self.DBSession().