diff --git a/content/posts/2022-11.md b/content/posts/2022-11.md index b33395df1..8967de914 100644 --- a/content/posts/2022-11.md +++ b/content/posts/2022-11.md @@ -502,5 +502,28 @@ $ sort -k4,1 /tmp/duplicates.txt | \ - This worked very well, but there were some metadata values that were tripled or quadrupled, so it only deleted the first duplicate - I just ran it again two more times to find the last duplicates, now we have none! +- I also generated another SQL file with commands to update the last modified timestamps of these items: + +```console +$ awk -F'\t' '{print $4}' /tmp/duplicates.txt | sort -u | sed "s/^\(.*\)$/UPDATE item SET last_modified=NOW() WHERE uuid='\1';/" > /tmp/update-timestamp.sql +``` + +- Tezira said she was having trouble archiving submissions + - In the afternoon I looked and found a high number of locks: + +```console +$ psql -c 'SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid;' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c | sort -n + 60 dspaceCli + 176 dspaceApi + 1194 dspaceWeb +``` + +[!PostgreSQL database locks](/cgspace-notes/2022/11/postgres_locks_cgspace-day.png) + +- The timing looks suspiciously close to when I was running the batch updates on the ILRI community this morning. + - I restarted Tomcat and PostgreSQL and everything was back to normal +- I found some items on CGSpace in Dinka, Ndogo, and Bari languages, but the `dcterms.language` field was "other" + - That's so unfortunate! These languages are not in ISO 639-1, but they are in ISO 639-3, which uses Alpha 3 and has more space for languages + - I changed them from other to use the three-letter codes, and I will suggest to the CG Core group that we use ISO 639-3 in the future diff --git a/docs/2022-11/index.html b/docs/2022-11/index.html index 760762571..e8d2e4b71 100644 --- a/docs/2022-11/index.html +++ b/docs/2022-11/index.html @@ -24,7 +24,7 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe - + @@ -54,9 +54,9 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe "@type": "BlogPosting", "headline": "November, 2022", "url": "https://alanorth.github.io/cgspace-notes/2022-11/", - "wordCount": "3206", + "wordCount": "3401", "datePublished": "2022-11-01T09:11:36+03:00", - "dateModified": "2022-11-28T23:19:19+03:00", + "dateModified": "2022-11-30T12:35:31+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -707,6 +707,33 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe
  • I just ran it again two more times to find the last duplicates, now we have none!
  • +
  • I also generated another SQL file with commands to update the last modified timestamps of these items:
  • + +
    $ awk -F'\t' '{print $4}' /tmp/duplicates.txt | sort -u | sed "s/^\(.*\)$/UPDATE item SET last_modified=NOW() WHERE uuid='\1';/" > /tmp/update-timestamp.sql
    +
    +
    $ psql -c 'SELECT * FROM pg_locks pl LEFT JOIN pg_stat_activity psa ON pl.pid = psa.pid;' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c | sort -n
    +     60 dspaceCli
    +    176 dspaceApi
    +   1194 dspaceWeb
    +

    !PostgreSQL database locks

    + diff --git a/docs/2022/11/postgres_locks_cgspace-day.png b/docs/2022/11/postgres_locks_cgspace-day.png new file mode 100644 index 000000000..2c5651a8f Binary files /dev/null and b/docs/2022/11/postgres_locks_cgspace-day.png differ diff --git a/docs/categories/index.html b/docs/categories/index.html index 22e797200..bf81a4e96 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index f8e5cee28..8635afcf6 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 49cdec66b..121554f1a 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index 9be03b9fc..55821dacf 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index 87a6d56d9..369eacc34 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/5/index.html b/docs/categories/notes/page/5/index.html index 36b0fbf71..9cf2c444e 100644 --- a/docs/categories/notes/page/5/index.html +++ b/docs/categories/notes/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/6/index.html b/docs/categories/notes/page/6/index.html index 62f9b51e7..2ca576d1c 100644 --- a/docs/categories/notes/page/6/index.html +++ b/docs/categories/notes/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/7/index.html b/docs/categories/notes/page/7/index.html index 9a0975dc3..0b25b5a4f 100644 --- a/docs/categories/notes/page/7/index.html +++ b/docs/categories/notes/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.html b/docs/index.html index b32357b79..ddf182a42 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index 33d09a9ac..bda9301db 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 7cbafaa0c..0815ab9ab 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index a2e23b1ca..8ba30cf55 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index 46cde0f30..141652f64 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index bd430664f..44261954d 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index 73bea5c9d..fce1d6044 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/8/index.html b/docs/page/8/index.html index acd0ef2aa..041669ee9 100644 --- a/docs/page/8/index.html +++ b/docs/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/9/index.html b/docs/page/9/index.html index 00d2e4900..6f193f1d9 100644 --- a/docs/page/9/index.html +++ b/docs/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index 5b6fbbd93..a2201b88a 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index d1cac4a9b..092fe8770 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index 006837b81..6b7cd988f 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index 7c41f8367..bdd442fb2 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index 8cf54bcdb..51ff904d9 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index 100a02916..69cc81b4e 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index da0cdd183..2509a28fd 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/8/index.html b/docs/posts/page/8/index.html index 927f67323..b94161e29 100644 --- a/docs/posts/page/8/index.html +++ b/docs/posts/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/9/index.html b/docs/posts/page/9/index.html index d0a5a14be..35e83b14b 100644 --- a/docs/posts/page/9/index.html +++ b/docs/posts/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 0cafaa05e..2cbb4a700 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -3,19 +3,19 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml"> https://alanorth.github.io/cgspace-notes/categories/ - 2022-11-28T23:19:19+03:00 + 2022-11-30T12:35:31+03:00 https://alanorth.github.io/cgspace-notes/ - 2022-11-28T23:19:19+03:00 + 2022-11-30T12:35:31+03:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2022-11-28T23:19:19+03:00 + 2022-11-30T12:35:31+03:00 https://alanorth.github.io/cgspace-notes/2022-11/ - 2022-11-28T23:19:19+03:00 + 2022-11-30T12:35:31+03:00 https://alanorth.github.io/cgspace-notes/posts/ - 2022-11-28T23:19:19+03:00 + 2022-11-30T12:35:31+03:00 https://alanorth.github.io/cgspace-notes/2022-10/ 2022-10-31T16:59:47+03:00 diff --git a/static/2022/11/postgres_locks_cgspace-day.png b/static/2022/11/postgres_locks_cgspace-day.png new file mode 100644 index 000000000..2c5651a8f Binary files /dev/null and b/static/2022/11/postgres_locks_cgspace-day.png differ