Article ID: 114806, created on Sep 21, 2012, last review on Nov 19, 2014

  • Applies to:
  • Operations Automation

Symptoms

POA task fails and the error message 'integer out of range' may be found in the log like in the example below:

Sep 14 20:34:10 osscore : DBG [1:16079:b3b12b90:267 1:16079:b1ba3b90 Kernel]: STMT [Con: 24034, 0xb01d6b08 txn:1545235] ' SELECT hc.host_id AS host_id , (hc.amount - hc.consumption) FROM host_capacities hc JOIN capacities c ON (hc.capacity_id = c.capacity_id) WHERE c.name = ? AND (hc.amount - hc.consumption) >= ? AND hc.host_id IN ( ?, ?, ?, ? ) ORDER BY 2 DESC'($0 = 'VPS Number per HW node', $1 = 1, $2 = 85, $3 = 112, $4 = 83, $5 = 588)
Sep 14 20:34:10 osscore : ERR [1:16079:b3b12b90:267 1:16079:b1ba3b90 lib]: [txn:1545235 DB::Statement::execQuery] {module_id="db_service"; code="1"} 'ERROR:  integer out of range; Error while executing the query' while ' SELECT hc.host_id AS host_id , (hc.amount - hc.consumption) FROM host_capacities hc JOIN capacities c ON (hc.capacity_id = c.capacity_id) WHERE c.name = ? AND (hc.amount - hc.consumption) >= ? AND hc.host_id IN ( ?, ?, ?, ? ) ORDER BY 2 DESC'

If we substitute parameters in the failed SQL query ('?' signs) with their actual values (they are present in the log right after the query itself) then we will get the following failed SQL query:

SELECT hc.host_id AS host_id , (hc.amount - hc.consumption) FROM host_capacities hc JOIN capacities c ON (hc.capacity_id = c.capacity_id) WHERE c.name = 'VPS Number per HW node' AND (hc.amount - hc.consumption) >= 1 AND hc.host_id IN (85, 112, 83, 588) ORDER BY 2 DESC'

The problem may appear in different POA hosting modules, e.g. in VPS hosting.

Cause

Integer value overflow occurs when POA is trying to fetch data from database and operate them.

For example, some fields in database may contain values close to MAXINT and when POA is trying to calculate sum of such values integer overflow occurs. E.g. the the Consumption parameter in a VPS hardware node properties for the Virtual Memory capacity may be incorrectly set to big negative value like on the screenshot below:

Your text to link here...

In this case SQL query may fail if POA try to perform math operations on big values.

Resolution

Contact the Parallels Support Team to resolve the issue.

Search Words

integer out of range

failed task

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF