Error while running analytics in 2.29

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

image

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards

···

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

image

···

Regards,

Gerald

Yes, I rebooted the server, but still I am getting the same issue while running analytics

image

···

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

image

···

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Regards,

Gerald

I am using Postgres 9.4 . Please find the attached postgres conf file

postgresql.conf (20.1 KB)

···

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar,

What is the RAM size of this server, Is it 8BG?

image

···

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Regards,

Gerald

Yes, its 8 GB

image

···

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

image

···

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Regards,

Gerald

Kumar,

Any update?

image

···

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Regards,

Gerald

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]

  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012

  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)

  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table

  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav

image

···

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

I would like to add one point in analysis that, Analytics ran successfully when it was run for a period of last 2 years.

image

···

On Tue, Jun 5, 2018 at 4:04 PM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

I will look into this and get back to you.

image

···

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Regards,

Gerald

Sure, Thanks Gerald.

image

···

On Tue, Jun 5, 2018 at 4:27 PM, gerald thomas gerald17006@gmail.com wrote:

I will look into this and get back to you.

On Tue, 5 Jun 2018 at 10:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav

Regards,

Gerald

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Hi Kumar

That does indeed look like a bug. In which case you should create a jira issue.

I am just a little surprised that there is nobody else with weekly data from 2012/2013 reporting the same problem. That would be good to confirm.

Bob

image

···

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

I encountered exactly the same bug, but shamefully did not report, just coped with it by removing data older than 2014 as I did not need it.

Knut

image

···

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar

Hi

I’ve had this “exception during execution” failures happening many times, with a multitude of reasons. In general, it’s caused by either a data issue - some data is “discrepant” compared to the meta-data - or it can be caused by meta-data discrepancies (some times temporary).

The last time I had it - for the Sierra Leone HMIS last week - a simple use of Maintenance->Reload apps fixed it.

In other cases I’ve fixed it by manually deleting all the resource tables (those starting with _ in the name) and re-creating them by using Maintenance->Resource tables (your _periodstructure table might contain some rubbish)

I’ve also had cases where deleting all analytics tables and resource tables and then re-start fixed the problem.

If _periodstructure contains garbage, it might originate from the period table - so check that too (sort on periodtype, and ensure that all records have start/end dates coherent with the periodtype)

Regards

calle

image

···

On 5 June 2018 at 14:00, Knut Staring knutst@gmail.com wrote:

I encountered exactly the same bug, but shamefully did not report, just coped with it by removing data older than 2014 as I did not need it.

Knut

On Tue, Jun 5, 2018 at 1:58 PM Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi Kumar

That does indeed look like a bug. In which case you should create a jira issue.

I am just a little surprised that there is nobody else with weekly data from 2012/2013 reporting the same problem. That would be good to confirm.

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19119

Email: calle.hedberg@gmail.com

Skype: calle_hedberg


Thanks for input Bob and Knut. I have logged a jira ticket for this issue.
Ticket can be viewed here https://jira.dhis2.org/browse/DHIS2-3922

Regards

Gaurav

image

···

On Tue, Jun 5, 2018 at 5:30 PM, Knut Staring knutst@gmail.com wrote:

I encountered exactly the same bug, but shamefully did not report, just coped with it by removing data older than 2014 as I did not need it.

Knut

On Tue, Jun 5, 2018 at 1:58 PM Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi Kumar

That does indeed look like a bug. In which case you should create a jira issue.

I am just a little surprised that there is nobody else with weekly data from 2012/2013 reporting the same problem. That would be good to confirm.

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Hi, this might be a bug that got fixed recently - see here: https://jira.dhis2.org/browse/DHIS2-3844

Best,

David

image

···

On Tue, Jun 5, 2018 at 2:34 PM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for input Bob and Knut. I have logged a jira ticket for this issue.
Ticket can be viewed here https://jira.dhis2.org/browse/DHIS2-3922

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 5:30 PM, Knut Staring knutst@gmail.com wrote:

I encountered exactly the same bug, but shamefully did not report, just coped with it by removing data older than 2014 as I did not need it.

Knut

On Tue, Jun 5, 2018 at 1:58 PM Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi Kumar

That does indeed look like a bug. In which case you should create a jira issue.

I am just a little surprised that there is nobody else with weekly data from 2012/2013 reporting the same problem. That would be good to confirm.

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

David Huser
DHIS2 Support Specialist

dhuser@baosystems.com | https://baosystems.com | 2900 K Street, Suite 507, Washington D.C. 20007

Yes, this was fixed two days back. I saw some new commits were made in 2.29. I have taken the latest commit and now I see that the issue is resolved.
Thanks for inputs !!

Regards

Gaurav

image

···

On Tue, Jun 5, 2018 at 10:46 PM, David Huser dhuser@baosystems.com wrote:

Hi, this might be a bug that got fixed recently - see here: https://jira.dhis2.org/browse/DHIS2-3844

Best,

David

On Tue, Jun 5, 2018 at 2:34 PM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for input Bob and Knut. I have logged a jira ticket for this issue.
Ticket can be viewed here https://jira.dhis2.org/browse/DHIS2-3922

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

David Huser
DHIS2 Support Specialist

dhuser@baosystems.com | https://baosystems.com | 2900 K Street, Suite 507, Washington D.C. 20007

On Tue, Jun 5, 2018 at 5:30 PM, Knut Staring knutst@gmail.com wrote:

I encountered exactly the same bug, but shamefully did not report, just coped with it by removing data older than 2014 as I did not need it.

Knut

On Tue, Jun 5, 2018 at 1:58 PM Bob Jolliffe bobjolliffe@gmail.com wrote:

Hi Kumar

That does indeed look like a bug. In which case you should create a jira issue.

I am just a little surprised that there is nobody else with weekly data from 2012/2013 reporting the same problem. That would be good to confirm.

Bob


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Knut Staring

Department of Information, Evidence and Research
World Health Organization, Geneva, Switzerland
Office: +41 22 791 3683 Mob1: +33 6 4434 2931 Mob2: +47 9188 0522
Skype: knutstar


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On 5 June 2018 at 11:34, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Thanks for the inputs Gerald. I have made the changes in postgres conf file. However, I was still facing the same issues.

I was looking into the server logs and I have following analysis :

  • When we run analytics, ANALYTICS_TABLE is created which is clear from this log message [Level: INFO, category: ANALYTICS_TABLE, time: Tue Jun 05 09:51:34 UTC 2018, message: Creating analytics tables]
  • Once this table is created, we get log message as : Creating partition table: analytics_temp_2012
  • This table has a constraint on column ‘yearly’ : “analytics_temp_2012_yearly_check" CHECK (yearly = ‘2012’::text)
  • Values are inserted into these table by extracting rows using a sql query. This sql query does an inner join with ‘_periodstructure’ table
  • One of the rows that was getting inserted into table ‘analytics_temp_2012’ contains following values (this list does not include all the columns)

biweekly

2013BiW0

monthly

201301

bimonthly

201301B

quarterly

2013Q1

sixmonthly

2013S1

sixmonthlyapril

2012AprilS2

yearly

2013

financialapril

2012April

financialjuly

2012July

financialoct

2012Oct

startdate

2012-12-31

enddate

2013-01-06

year

2012

  • Here we can see that if the week starts on 2012(‘startdate’ column has value 31-12-2012(dd-mm-yyyy)) and ends on 2013(‘enddate’ is 06-01-2012), and majority of days for that week falls in 2013. Then the value for column ‘yearly’ is populated as ‘2013’, while the constraint applied on column expects it to be ‘2012’.

This seems to be bug on DHIS. Can you please confirm this.

Regards

Gaurav


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

On Tue, Jun 5, 2018 at 3:57 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Any update?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 9:14 AM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

Kindly change the following on your postgresql.conf:

shared_buffers = 2120 MB

effective_cache_size = 5300 MB

Then do:

sudo service postgres restart

And run analytics again

Regards,

Gerald

On Tue, Jun 5, 2018 at 8:58 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, its 8 GB

Regards,

Gerald

On Tue, Jun 5, 2018 at 2:13 PM, gerald thomas gerald17006@gmail.com wrote:

Kumar,

What is the RAM size of this server, Is it 8BG?


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 6:39 AM, Kumar Shahdeo gauravns@thoughtworks.com wrote:

I am using Postgres 9.4 . Please find the attached postgres conf file

Regards,

Gerald

On Tue, Jun 5, 2018 at 11:24 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

What version of Postgres are running? Normally, these errors occurs when the postgres.conf is not configured properly based on the data size it has to analyzed.

Please can you send your Postgres.conf file.

On Tue, 5 Jun 2018 at 05:40, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Yes, I rebooted the server, but still I am getting the same issue while running analytics

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

On Tue, Jun 5, 2018 at 10:52 AM, gerald thomas gerald17006@gmail.com wrote:

Dear Kumar,

Have you tried to reboot the server after upgrades and then run analytics again?

On Tue, 5 Jun 2018 at 04:49, Kumar Shahdeo gauravns@thoughtworks.com wrote:

Hi DHIS users,

I have migrated from DHIS 2.27 to DHIS 2.29. I used the upgrade script provided by DHIS to upgrade the db. I have tried both incremental upgrade (2.27->2.28->2.29) and skipping 2.28(2.27->2.29). In both the cases I am getting the same issue.

I am not able to run analytics. Analytics fails with below error(captured in screenshot)

When I checked server logs. I got this exception :

org.springframework.dao.DataIntegrityViolationException with error message ‘new row for relation “analytics_temp_2012” violates check constraint "analytics_temp_2012,_yearly_check”’

Any suggestions on this will be highly appreciated.

Regards


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Regards,

Gerald


Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks

Kumar Gaurav Nath Shahdeo
Developer
Email
gauravns@thoughtworks.com
Telephone
+91 9160688935
ThoughtWorks