# CGSpace Notes
Documenting day-to-day work on the [CGSpace](https://cgspace.cgiar.org) repository.

## July, 2020

Wed Jul 01, 2020 by Alan Orth in Notes

## 2020-07-01

- A few users noticed that CGSpace wasn’t loading items today, item pages seem blank
  - I looked at the PostgreSQL locks but they don’t seem unusual
  - I guess this is the same “blank item page” issue that we had a few times in 2019 that we never solved
  - I restarted Tomcat and PostgreSQL and the issue was gone
- Since I was restarting Tomcat anyways I decided to redeploy the latest changes from the `5_x-prod` branch and I added a note about COVID-19 items to the CGSpace frontpage at Peter’s request

Read more →

## June, 2020

Mon Jun 01, 2020 by Alan Orth in Notes

## 2020-06-01

- I tried to run the `AtomicStatisticsUpdateCLI` CUA migration script on DSpace Test (linode26) again and it is still going very slowly and has tons of errors like I noticed yesterday
  - I sent Atmire the dspace.log from today and told them to log into the server to debug the process
- In other news, I checked the statistics API on DSpace 6 and it’s working
- I tried to build the OAI registry on the freshly migrated DSpace 6 on DSpace Test and I get an error:

Read more →

## May, 2020

Sat May 02, 2020 by Alan Orth in Notes

## 2020-05-02

- Peter said that CTA is having problems submitting an item to CGSpace
  - Looking at the PostgreSQL stats it seems to be the same issue that Tezira was having last week, as I see the number of connections in ‘idle in transaction’ and ‘waiting for lock’ state are increasing again
  - I see that CGSpace (linode18) is still using PostgreSQL JDBC driver version 42.2.11, and there were some bugs related to transactions fixed in 42.2.12 (which I had updated in the Ansible playbooks, but not deployed yet)

Read more →

## April, 2020

Thu Apr 02, 2020 by Alan Orth in Notes

## 2020-04-02

- Maria asked me to update Charles Staver’s ORCID iD in the submission template and on CGSpace, as his name was lower case before, and now he has corrected it
  - I updated the fifty-eight existing items on CGSpace
- Looking into the items Udana had asked about last week that were missing Altmetric donuts:
  - The first is still missing its DOI, so I added it and tweeted its handle (after a few hours there was a donut with score 222)
  - The second item now has a donut with score 2 since I tweeted its handle last week
  - The third item now has a donut with score 1 since I tweeted it last week
- On the same note, the one item Abenet pointed out last week now has a donut with score of 104 after I tweeted it last week

Read more →

## March, 2020

Mon Mar 02, 2020 by Alan Orth in Notes

## 2020-03-02

- Update dspace-statistics-api for DSpace 6+ UUIDs
  - Tag version 1.2.0 on GitHub
- Test migrating legacy Solr statistics to UUIDs with the as-of-yet unreleased SolrUpgradePre6xStatistics.java
  - You need to download this into the DSpace 6.x source and compile it

Read more →

## February, 2020

Sun Feb 02, 2020 by Alan Orth in Notes

## 2020-02-02

- Continue working on porting CGSpace’s DSpace 5 code to DSpace 6.3 that I started yesterday
  - Sign up for an account with MaxMind so I can get the GeoLite2-City.mmdb database
  - I still need to wire up the API credentials and cron job into the Ansible infrastructure playbooks
  - Fix some minor issues in the config and XMLUI themes, like removing Atmire stuff
  - The code finally builds and runs with a fresh install

Read more →

## January, 2020

Mon Jan 06, 2020 by Alan Orth in Notes

## 2020-01-06

- Open a ticket with Atmire to request a quote for the upgrade to DSpace 6
- Last week Altmetric responded about the item that had a lower score than than its DOI
  - The score is now linked to the DOI
  - Another item that had the same problem in 2019 has now also linked to the score for its DOI
  - Another item that had the same problem in 2019 has also been fixed

## 2020-01-07

- Peter Ballantyne highlighted one more WLE item that is missing the Altmetric score that its DOI has
  - The DOI has a score of 259, but the Handle has no score at all
  - I tweeted the CGSpace repository link

Read more →

## December, 2019

Sun Dec 01, 2019 by Alan Orth in Notes

## 2019-12-01

- Upgrade CGSpace (linode18) to Ubuntu 18.04:
  - Check any packages that have residual configs and purge them:
  - # dpkg -l | grep -E ‘^rc’ | awk ‘{print $2}’ | xargs dpkg -P
  - Make sure all packages are up to date and the package manager is up to date, then reboot:

    # apt update && apt full-upgrade
    # apt-get autoremove && apt-get autoclean
    # dpkg -C
    # reboot

Read more →

## November, 2019

Mon Nov 04, 2019 by Alan Orth in Notes

## 2019-11-04

- Peter noticed that there were 5.2 million hits on CGSpace in 2019-10 according to the Atmire usage statistics
  - I looked in the nginx logs and see 4.6 million in the access logs, and 1.2 million in the API logs:

    # zcat --force /var/log/nginx/*access.log.*.gz | grep -cE "[0-9]{1,2}/Oct/2019"
    4671942
    # zcat --force /var/log/nginx/{rest,oai,statistics}.log.*.gz | grep -cE "[0-9]{1,2}/Oct/2019"
    1277694

- So 4.6 million from XMLUI and another 1.2 million from API requests
- Let’s see how many of the REST API requests were for bitstreams (because they are counted in Solr stats):

    # zcat --force /var/log/nginx/rest.log.*.gz | grep -c -E "[0-9]{1,2}/Oct/2019"
    1183456
    # zcat --force /var/log/nginx/rest.log.*.gz | grep -E "[0-9]{1,2}/Oct/2019" | grep -c -E "/rest/bitstreams"
    106781

Read more →

## October, 2019

Tue Oct 01, 2019 by Alan Orth in Notes

2019-10-01 Udana from IWMI asked me for a CSV export of their community on CGSpace I exported it, but a quick run through the csv-metadata-quality tool shows that there are some low-hanging fruits we can fix before I send him the data I will limit the scope to the titles, regions, subregions, and river basins for now to manually fix some non-breaking spaces (U+00A0) there that would otherwise be removed by the csv-metadata-quality script’s “unneccesary Unicode” fix: $ csvcut -c 'id,dc. Read more →