-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 6.13.0, 7.13.3
-
Component/s: Core - Analytics
-
None
-
2
-
Severity 3 - Minor
Issue Summary
When trying to export analytics data for a large space (100k) pages, we will hit into "java.io.IOException: Tried to send an out-of-range integer as a 2-byte value: XXXX"
Steps to Reproduce
- Create large space with 100k pages
- Generate some user traffic on those pages (so that we have analytics data)
- Try to that date in https://base_url/plugins/confanalytics/analytics.action#/analytics/instance/overview
Expected Results
The data will be exported.
Actual Results
The export will fail after a few minutes
The below exception is thrown in the Atlassian-confluence.log file:
[http-nio-9011-exec-341] [rest.util.excel.ExcelGenerationException] toResponse com.addonengine.addons.analytics.rest.util.excel.ExcelGenerationException: org.springframework.transaction.TransactionSystemException: Could not roll back Hibernate transaction; nested exception is net.sf.hibernate.TransactionException: Unable to rollback against JDBC Connection ... 27 more at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:315) at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl.java:1433) at org.postgresql.core.v3.QueryExecutorImpl.sendOneQuery(QueryExecutorImpl.java:1872) at org.postgresql.core.v3.QueryExecutorImpl.sendParse(QueryExecutorImpl.java:1547) at org.postgresql.core.PGStream.sendInteger2(PGStream.java:347) Caused by: java.io.IOException: Tried to send an out-of-range integer as a 2-byte value: xxxxxx ... 21 more at com.querydsl.sql.AbstractSQLQuery.fetch(AbstractSQLQuery.java:446) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
Notes
The issue comes from the limit on the Postgresql side, but other DBs will be affected too, as limits exist on them as well.
https://stackoverflow.com/questions/6581573/what-are-the-max-number-of-allowable-parameters-per-database-provider-type
Workaround
Splitting the space into smaller spaces can help with the issue.