-
Bug
-
Resolution: Fixed
-
Low
-
3.0.10
-
Severity 3 - Minor
-
Summary:
JIRA Service Desk unable to process the emails due to the error below:
2016-03-15 23:05:36,158 ERROR [] Caesium-1-2 ServiceRunner MailJobRunner Failed com.mysema.query.QueryException: Caught SQLSyntaxErrorException for delete from "AO_2C4E5C_MAILITEMAUDIT" where "AO_2C4E5C_MAILITEMAUDIT"."MAIL_ITEM_ID" in (?, ?, ?, ?, ?, .... Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] ....
Cause:
- There is more than 1000 values on the IN query when DELETING rows to "AO_2C4E5C_MAILITEMAUDIT"
Expected Result:
- JIRA Service Desk should be able to run the query or at least adapt to it if the value is exceeding 1000.
Notes:
- JIRA Service Desk have a Cleaner Job to remove Rows that is old enough. It seems that due to Oracle have a limit for the IN value on one query, it reject the sql query if it exceed the limit, making JIRA Service Desk unable to remove the old Rows.
- So far, this makes JIRA Service Desk unable to process the emails from the mail server.
Workaround:
The workaround would need to do a direct modification towards the database. Please create the necessary backup before proceed on the steps below
- The cleaner job will try to remove any entries that are 6 months older.
- Generate the Epoch time for the date using http://www.epochconverter.com/
- Run the following query to count how many rows that is older than 6 months:
select count(*) from "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>;
- If the result is more than 1000, run the following query to remove the entries.
DELETE FROM "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>; DELETE FROM "AO_2C4E5C_MAILITEMCHUNK" WHERE "AO_2C4E5C_MAILITEMCHUNK"."MAIL_ITEM_ID" IN (SELECT "ID" from "AO_2C4E5C_MAILITEM" WHERE "UPDATED_TIMESTAMP" < <generated epoch time above>); DELETE FROM "AO_2C4E5C_MAILITEM" WHERE "UPDATED_TIMESTAMP" < <generated epoch time above>;
- Restart JIRA
- was cloned as
-
QUALITY-425 Failed to load
Form Name |
---|
[JSDSERVER-3584] ORA-01795: maximum number of expressions in a list is 1000
Workflow | Original: JSD Bug Workflow v5 - TEMP [ 2304681 ] | New: JAC Bug Workflow v3 [ 3126266 ] |
Status | Original: Done [ 10044 ] | New: Closed [ 6 ] |
Symptom Severity | Original: Minor [ 14432 ] | New: Severity 3 - Minor [ 15832 ] |
Workflow | Original: JSD Bug Workflow v5 [ 2058589 ] | New: JSD Bug Workflow v5 - TEMP [ 2304681 ] |
Workflow | Original: JSD Bug Workflow v5 - TEMP [ 2056024 ] | New: JSD Bug Workflow v5 [ 2058589 ] |
Workflow | Original: JSD Bug Workflow v5 [ 1955495 ] | New: JSD Bug Workflow v5 - TEMP [ 2056024 ] |
Workflow | Original: JSD Bug Workflow v4 [ 1615382 ] | New: JSD Bug Workflow v5 [ 1955495 ] |
Labels | New: affects-server |
Workflow | Original: JSD Bug Workflow v2 [ 1601962 ] | New: JSD Bug Workflow v4 [ 1615382 ] |
Workflow | Original: JSD Bug Workflow [ 1399085 ] | New: JSD Bug Workflow v2 [ 1601962 ] |
Description |
Original:
h3. Summary:
JIRA Service Desk unable to process the emails due to the error below: {noformat} 2016-03-15 23:05:36,158 ERROR [] Caesium-1-2 ServiceRunner MailJobRunner Failed com.mysema.query.QueryException: Caught SQLSyntaxErrorException for delete from "AO_2C4E5C_MAILITEMAUDIT" where "AO_2C4E5C_MAILITEMAUDIT"."MAIL_ITEM_ID" in (?, ?, ?, ?, ?, .... Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] .... {noformat} h3. Cause: * There is more than 1000 values on the IN query when DELETING rows to "AO_2C4E5C_MAILITEMAUDIT" h3. Expected Result: * JIRA Service Desk should be able to run the query or at least adapt to it if the value is exceeding 1000. h3. Notes: * JIRA Service Desk have a Cleaner Job to remove Rows that is old enough. It seems that due to Oracle have a limit for the IN value on one query, it reject the sql query if it exceed the limit, making JIRA Service Desk unable to remove the old Rows. * So far, this makes JIRA Service Desk unable to process the emails from the mail server. h3. Workaround: (!) {color:red} The workaround would need to do a direct modification towards the database. Please create the necessary backup before proceed on the steps below{color} # The cleaner job will try to remove any entries that are 6 months older. # Generate the Epoch time for the date using http://www.epochconverter.com/ # Run the following query to count how many rows that is older than 6 months: {code} select count(*) from "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>; {code} # If the result is more than 1000, run the following query to remove the entries. {code} DELETE FROM "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>; {code} # Restart JIRA |
New:
h3. Summary:
JIRA Service Desk unable to process the emails due to the error below: {noformat} 2016-03-15 23:05:36,158 ERROR [] Caesium-1-2 ServiceRunner MailJobRunner Failed com.mysema.query.QueryException: Caught SQLSyntaxErrorException for delete from "AO_2C4E5C_MAILITEMAUDIT" where "AO_2C4E5C_MAILITEMAUDIT"."MAIL_ITEM_ID" in (?, ?, ?, ?, ?, .... Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) [ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] .... {noformat} h3. Cause: * There is more than 1000 values on the IN query when DELETING rows to "AO_2C4E5C_MAILITEMAUDIT" h3. Expected Result: * JIRA Service Desk should be able to run the query or at least adapt to it if the value is exceeding 1000. h3. Notes: * JIRA Service Desk have a Cleaner Job to remove Rows that is old enough. It seems that due to Oracle have a limit for the IN value on one query, it reject the sql query if it exceed the limit, making JIRA Service Desk unable to remove the old Rows. * So far, this makes JIRA Service Desk unable to process the emails from the mail server. h3. Workaround: (!) {color:red} The workaround would need to do a direct modification towards the database. Please create the necessary backup before proceed on the steps below{color} # The cleaner job will try to remove any entries that are 6 months older. # Generate the Epoch time for the date using http://www.epochconverter.com/ # Run the following query to count how many rows that is older than 6 months: {code} select count(*) from "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>; {code} # If the result is more than 1000, run the following query to remove the entries. {code} DELETE FROM "AO_2C4E5C_MAILITEMAUDIT" WHERE "CREATED_TIMESTAMP" < <generated epoch time above>; DELETE FROM "AO_2C4E5C_MAILITEMCHUNK" WHERE "AO_2C4E5C_MAILITEMCHUNK"."MAIL_ITEM_ID" IN (SELECT "ID" from "AO_2C4E5C_MAILITEM" WHERE "UPDATED_TIMESTAMP" < <generated epoch time above>); DELETE FROM "AO_2C4E5C_MAILITEM" WHERE "UPDATED_TIMESTAMP" < <generated epoch time above>; {code} # Restart JIRA |