Add notes for 2022-03-04

This commit is contained in:
2022-03-04 15:30:06 +03:00
parent 7453499827
commit 27acbac859
115 changed files with 6550 additions and 6444 deletions

View File

@ -48,7 +48,7 @@ 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
"/>
<meta name="generator" content="Hugo 0.92.2" />
<meta name="generator" content="Hugo 0.93.1" />
@ -171,14 +171,14 @@ On the same note, the one item Abenet pointed out last week now has a donut with
</ul>
</li>
</ul>
<pre tabindex="0"><code>$ psql -h localhost -U postgres dspace -c &quot;DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value LIKE '%Ballantyne%';&quot;
<pre tabindex="0"><code>$ psql -h localhost -U postgres dspace -c &#34;DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value LIKE &#39;%Ballantyne%&#39;;&#34;
DELETE 97
$ ./add-orcid-identifiers-csv.py -i 2020-04-07-peter-orcids.csv -db dspace -u dspace -p 'fuuu' -d
$ ./add-orcid-identifiers-csv.py -i 2020-04-07-peter-orcids.csv -db dspace -u dspace -p &#39;fuuu&#39; -d
</code></pre><ul>
<li>I used this CSV with the script (all records with his name have the name standardized like this):</li>
</ul>
<pre tabindex="0"><code>dc.contributor.author,cg.creator.id
&quot;Ballantyne, Peter G.&quot;,&quot;Peter G. Ballantyne: 0000-0001-9346-2893&quot;
&#34;Ballantyne, Peter G.&#34;,&#34;Peter G. Ballantyne: 0000-0001-9346-2893&#34;
</code></pre><ul>
<li>Then I tried another way, to identify all duplicate ORCID identifiers for a given resource ID and group them so I can see if count is greater than 1:</li>
</ul>
@ -188,31 +188,31 @@ COPY 15209
<li>Of those, about nine authors had duplicate ORCID identifiers over about thirty records, so I created a CSV with all their name variations and ORCID identifiers:</li>
</ul>
<pre tabindex="0"><code>dc.contributor.author,cg.creator.id
&quot;Ballantyne, Peter G.&quot;,&quot;Peter G. Ballantyne: 0000-0001-9346-2893&quot;
&quot;Ramirez-Villegas, Julian&quot;,&quot;Julian Ramirez-Villegas: 0000-0002-8044-583X&quot;
&quot;Villegas-Ramirez, J&quot;,&quot;Julian Ramirez-Villegas: 0000-0002-8044-583X&quot;
&quot;Ishitani, Manabu&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Manabu, Ishitani&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Ishitani, M.&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Ishitani, M.&quot;,&quot;Manabu Ishitani: 0000-0002-6950-4018&quot;
&quot;Buruchara, Robin A.&quot;,&quot;Robin Buruchara: 0000-0003-0934-1218&quot;
&quot;Buruchara, Robin&quot;,&quot;Robin Buruchara: 0000-0003-0934-1218&quot;
&quot;Jarvis, Andy&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Jarvis, Andrew&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Jarvis, A.&quot;,&quot;Andy Jarvis: 0000-0001-6543-0798&quot;
&quot;Tohme, Joseph M.&quot;,&quot;Joe Tohme: 0000-0003-2765-7101&quot;
&quot;Hansen, James&quot;,&quot;James Hansen: 0000-0002-8599-7895&quot;
&quot;Hansen, James W.&quot;,&quot;James Hansen: 0000-0002-8599-7895&quot;
&quot;Asseng, Senthold&quot;,&quot;Senthold Asseng: 0000-0002-7583-3811&quot;
&#34;Ballantyne, Peter G.&#34;,&#34;Peter G. Ballantyne: 0000-0001-9346-2893&#34;
&#34;Ramirez-Villegas, Julian&#34;,&#34;Julian Ramirez-Villegas: 0000-0002-8044-583X&#34;
&#34;Villegas-Ramirez, J&#34;,&#34;Julian Ramirez-Villegas: 0000-0002-8044-583X&#34;
&#34;Ishitani, Manabu&#34;,&#34;Manabu Ishitani: 0000-0002-6950-4018&#34;
&#34;Manabu, Ishitani&#34;,&#34;Manabu Ishitani: 0000-0002-6950-4018&#34;
&#34;Ishitani, M.&#34;,&#34;Manabu Ishitani: 0000-0002-6950-4018&#34;
&#34;Ishitani, M.&#34;,&#34;Manabu Ishitani: 0000-0002-6950-4018&#34;
&#34;Buruchara, Robin A.&#34;,&#34;Robin Buruchara: 0000-0003-0934-1218&#34;
&#34;Buruchara, Robin&#34;,&#34;Robin Buruchara: 0000-0003-0934-1218&#34;
&#34;Jarvis, Andy&#34;,&#34;Andy Jarvis: 0000-0001-6543-0798&#34;
&#34;Jarvis, Andrew&#34;,&#34;Andy Jarvis: 0000-0001-6543-0798&#34;
&#34;Jarvis, A.&#34;,&#34;Andy Jarvis: 0000-0001-6543-0798&#34;
&#34;Tohme, Joseph M.&#34;,&#34;Joe Tohme: 0000-0003-2765-7101&#34;
&#34;Hansen, James&#34;,&#34;James Hansen: 0000-0002-8599-7895&#34;
&#34;Hansen, James W.&#34;,&#34;James Hansen: 0000-0002-8599-7895&#34;
&#34;Asseng, Senthold&#34;,&#34;Senthold Asseng: 0000-0002-7583-3811&#34;
</code></pre><ul>
<li>Then I deleted <em>all</em> their existing ORCID identifier records:</li>
</ul>
<pre tabindex="0"><code>dspace=# DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value SIMILAR TO '%(0000-0001-6543-0798|0000-0001-9346-2893|0000-0002-6950-4018|0000-0002-7583-3811|0000-0002-8044-583X|0000-0002-8599-7895|0000-0003-0934-1218|0000-0003-2765-7101)%';
<pre tabindex="0"><code>dspace=# DELETE FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=240 AND text_value SIMILAR TO &#39;%(0000-0001-6543-0798|0000-0001-9346-2893|0000-0002-6950-4018|0000-0002-7583-3811|0000-0002-8044-583X|0000-0002-8599-7895|0000-0003-0934-1218|0000-0003-2765-7101)%&#39;;
DELETE 994
</code></pre><ul>
<li>And then I added them again using the <code>add-orcid-identifiers</code> records:</li>
</ul>
<pre tabindex="0"><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-07-fix-duplicate-orcids.csv -db dspace -u dspace -p 'fuuu' -d
<pre tabindex="0"><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-07-fix-duplicate-orcids.csv -db dspace -u dspace -p &#39;fuuu&#39; -d
</code></pre><ul>
<li>I ran the fixes on DSpace Test and CGSpace as well</li>
<li>I started testing the <a href="https://github.com/ilri/DSpace/pull/445">pull request</a> sent by Atmire yesterday
@ -230,7 +230,7 @@ DELETE 994
</ul>
</li>
</ul>
<pre tabindex="0"><code>dspace63=# DELETE FROM schema_version WHERE version IN ('5.8.2015.12.03.3');
<pre tabindex="0"><code>dspace63=# DELETE FROM schema_version WHERE version IN (&#39;5.8.2015.12.03.3&#39;);
dspace63=# CREATE EXTENSION pgcrypto;
</code></pre><ul>
<li>Then DSpace 6.3 started up OK and I was able to see some statistics in the Content and Usage Analysis (CUA) module, but not on community, collection, or item pages
@ -243,7 +243,7 @@ dspace63=# CREATE EXTENSION pgcrypto;
</code></pre><ul>
<li>And I remembered I actually need to run the DSpace 6.4 Solr UUID migrations:</li>
</ul>
<pre tabindex="0"><code>$ export JAVA_OPTS=&quot;-Xmx1024m -Dfile.encoding=UTF-8&quot;
<pre tabindex="0"><code>$ export JAVA_OPTS=&#34;-Xmx1024m -Dfile.encoding=UTF-8&#34;
$ ~/dspace63/bin/dspace solr-upgrade-statistics-6x
</code></pre><ul>
<li>Run system updates on DSpace Test (linode26) and reboot it</li>
@ -258,7 +258,7 @@ $ ~/dspace63/bin/dspace solr-upgrade-statistics-6x
<li>I realized that <code>solr-upgrade-statistics-6x</code> only processes 100,000 records by default so I think we actually need to finish running it for all legacy Solr records before asking Atmire why CUA statlets and detailed statistics aren&rsquo;t working</li>
<li>For now I am just doing 250,000 records at a time on my local environment:</li>
</ul>
<pre tabindex="0"><code>$ export JAVA_OPTS=&quot;-Xmx2000m -Dfile.encoding=UTF-8&quot;
<pre tabindex="0"><code>$ export JAVA_OPTS=&#34;-Xmx2000m -Dfile.encoding=UTF-8&#34;
$ ~/dspace63/bin/dspace solr-upgrade-statistics-6x -n 250000
</code></pre><ul>
<li>Despite running the migration for all of my local 1.5 million Solr records, I still see a few hundred thousand like <code>-1</code> and <code>0-unmigrated</code>
@ -284,7 +284,7 @@ $ podman start artifactory
<ul>
<li>A few days ago Peter asked me to update an author&rsquo;s name on CGSpace and in the controlled vocabularies:</li>
</ul>
<pre tabindex="0"><code>dspace=# UPDATE metadatavalue SET text_value='Knight-Jones, Theodore J.D.' WHERE resource_type_id=2 AND metadata_field_id=3 AND text_value='Knight-Jones, T.J.D.';
<pre tabindex="0"><code>dspace=# UPDATE metadatavalue SET text_value=&#39;Knight-Jones, Theodore J.D.&#39; WHERE resource_type_id=2 AND metadata_field_id=3 AND text_value=&#39;Knight-Jones, T.J.D.&#39;;
</code></pre><ul>
<li>I updated his existing records on CGSpace, changed the controlled lists, added his ORCID identifier to the controlled list, and tagged his thirty-nine items with the ORCID iD</li>
<li>The new DSpace 6 stuff that Atmire sent modifies the Mirage 2&rsquo;s <code>pom.xml</code> to copy the each theme&rsquo;s resulting <code>node_modules</code> to each theme after building and installing with <code>ant update</code> because they moved some packages from bower to npm and now reference them in <code>page-structure.xsl</code>
@ -315,7 +315,7 @@ $ podman start artifactory
<ul>
<li>Looking into a high rate of outgoing bandwidth from yesterday on CGSpace (linode18):</li>
</ul>
<pre tabindex="0"><code># cat /var/log/nginx/*.log /var/log/nginx/*.log.1 | grep -E &quot;19/Apr/2020:0[6789]&quot; | goaccess --log-format=COMBINED -
<pre tabindex="0"><code># cat /var/log/nginx/*.log /var/log/nginx/*.log.1 | grep -E &#34;19/Apr/2020:0[6789]&#34; | goaccess --log-format=COMBINED -
</code></pre><ul>
<li>One host in Russia (91.241.19.70) download 23GiB over those few hours in the morning
<ul>
@ -325,7 +325,7 @@ $ podman start artifactory
</ul>
<pre tabindex="0"><code># grep -c 91.241.19.70 /var/log/nginx/access.log.1
8900
# grep 91.241.19.70 /var/log/nginx/access.log.1 | grep -c '10568/35187'
# grep 91.241.19.70 /var/log/nginx/access.log.1 | grep -c &#39;10568/35187&#39;
8900
</code></pre><ul>
<li>I thought the host might have been Yandex misbehaving, but its user agent is:</li>
@ -343,20 +343,20 @@ Total number of bot hits purged: 8909
</code></pre><ul>
<li>While investigating that I noticed ORCID identifiers missing from a few authors names, so I added them with my <code>add-orcid-identifiers.py</code> script:</li>
</ul>
<pre tabindex="0"><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-20-add-orcids.csv -db dspace -u dspace -p 'fuuu' -d
<pre tabindex="0"><code>$ ./add-orcid-identifiers-csv.py -i 2020-04-20-add-orcids.csv -db dspace -u dspace -p &#39;fuuu&#39; -d
</code></pre><ul>
<li>The contents of <code>2020-04-20-add-orcids.csv</code> was:</li>
</ul>
<pre tabindex="0"><code>dc.contributor.author,cg.creator.id
&quot;Schut, Marc&quot;,&quot;Marc Schut: 0000-0002-3361-4581&quot;
&quot;Schut, M.&quot;,&quot;Marc Schut: 0000-0002-3361-4581&quot;
&quot;Kamau, G.&quot;,&quot;Geoffrey Kamau: 0000-0002-6995-4801&quot;
&quot;Kamau, G&quot;,&quot;Geoffrey Kamau: 0000-0002-6995-4801&quot;
&quot;Triomphe, Bernard&quot;,&quot;Bernard Triomphe: 0000-0001-6657-3002&quot;
&quot;Waters-Bayer, Ann&quot;,&quot;Ann Waters-Bayer: 0000-0003-1887-7903&quot;
&quot;Klerkx, Laurens&quot;,&quot;Laurens Klerkx: 0000-0002-1664-886X&quot;
&#34;Schut, Marc&#34;,&#34;Marc Schut: 0000-0002-3361-4581&#34;
&#34;Schut, M.&#34;,&#34;Marc Schut: 0000-0002-3361-4581&#34;
&#34;Kamau, G.&#34;,&#34;Geoffrey Kamau: 0000-0002-6995-4801&#34;
&#34;Kamau, G&#34;,&#34;Geoffrey Kamau: 0000-0002-6995-4801&#34;
&#34;Triomphe, Bernard&#34;,&#34;Bernard Triomphe: 0000-0001-6657-3002&#34;
&#34;Waters-Bayer, Ann&#34;,&#34;Ann Waters-Bayer: 0000-0003-1887-7903&#34;
&#34;Klerkx, Laurens&#34;,&#34;Laurens Klerkx: 0000-0002-1664-886X&#34;
</code></pre><ul>
<li>I confirmed some of the authors' names from the report itself, then by looking at their profiles on ORCID.org</li>
<li>I confirmed some of the authors&rsquo; names from the report itself, then by looking at their profiles on ORCID.org</li>
<li>Add new ILRI subject &ldquo;COVID19&rdquo; to the <code>5_x-prod</code> branch</li>
<li>Add new CCAFS Phase II project tags to the <code>5_x-prod</code> branch</li>
<li>I will deploy these to CGSpace in the next few days</li>
@ -387,17 +387,17 @@ Total number of bot hits purged: 8909
</ul>
</li>
</ul>
<pre tabindex="0"><code>$ export JAVA_OPTS=&quot;-Dfile.encoding=UTF-8 -Xmx1024m&quot;
<pre tabindex="0"><code>$ export JAVA_OPTS=&#34;-Dfile.encoding=UTF-8 -Xmx1024m&#34;
$ time chrt -i 0 ionice -c2 -n7 nice -n19 dspace index-discovery -b
</code></pre><ul>
<li>I ran the <code>dspace cleanup -v</code> process on CGSpace and got an error:</li>
</ul>
<pre tabindex="0"><code>Error: ERROR: update or delete on table &quot;bitstream&quot; violates foreign key constraint &quot;bundle_primary_bitstream_id_fkey&quot; on table &quot;bundle&quot;
Detail: Key (bitstream_id)=(184980) is still referenced from table &quot;bundle&quot;.
<pre tabindex="0"><code>Error: ERROR: update or delete on table &#34;bitstream&#34; violates foreign key constraint &#34;bundle_primary_bitstream_id_fkey&#34; on table &#34;bundle&#34;
Detail: Key (bitstream_id)=(184980) is still referenced from table &#34;bundle&#34;.
</code></pre><ul>
<li>The solution is, as always:</li>
</ul>
<pre tabindex="0"><code>$ psql -d dspace -U dspace -c 'update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (183996);'
<pre tabindex="0"><code>$ psql -d dspace -U dspace -c &#39;update bundle set primary_bitstream_id=NULL where primary_bitstream_id in (183996);&#39;
UPDATE 1
</code></pre><ul>
<li>I spent some time working on the XMLUI themes in DSpace 6
@ -413,7 +413,7 @@ UPDATE 1
</li>
</ul>
<pre tabindex="0"><code>.breadcrumb &gt; li + li:before {
content: &quot;/\00a0&quot;;
content: &#34;/\00a0&#34;;
}
</code></pre><h2 id="2020-04-27">2020-04-27</h2>
<ul>
@ -421,9 +421,9 @@ UPDATE 1
<li>My changes to DSpace XMLUI Mirage 2 build process mean that we don&rsquo;t need Ruby gems at all anymore! We can completely build without them!</li>
<li>Trying to test the <code>com.atmire.statistics.util.update.atomic.AtomicStatisticsUpdateCLI</code> script but there is an error:</li>
</ul>
<pre tabindex="0"><code>Exception: org.apache.solr.search.SyntaxError: Cannot parse 'cua_version:${cua.version.number}': Encountered &quot; &quot;}&quot; &quot;} &quot;&quot; at line 1, column 32.
<pre tabindex="0"><code>Exception: org.apache.solr.search.SyntaxError: Cannot parse &#39;cua_version:${cua.version.number}&#39;: Encountered &#34; &#34;}&#34; &#34;} &#34;&#34; at line 1, column 32.
Was expecting one of:
&quot;TO&quot; ...
&#34;TO&#34; ...
&lt;RANGE_QUOTED&gt; ...
&lt;RANGE_GOOP&gt; ...
</code></pre><ul>
@ -473,7 +473,7 @@ atmire-cua.version.number=${cua.version.number}
</ul>
</li>
</ul>
<pre tabindex="0"><code>Record uid: ee085cc0-0110-42c5-80b9-0fad4015ed9f couldn't be processed
<pre tabindex="0"><code>Record uid: ee085cc0-0110-42c5-80b9-0fad4015ed9f couldn&#39;t be processed
com.atmire.statistics.util.update.atomic.ProcessingException: something went wrong while processing record uid: ee085cc0-0110-42c5-80b9-0fad4015ed9f, an error occured in the com.atmire.statistics.util.update.atomic.processor.ContainerOwnerDBProcessor
at com.atmire.statistics.util.update.atomic.AtomicStatisticsUpdater.applyProcessors(AtomicStatisticsUpdater.java:304)
at com.atmire.statistics.util.update.atomic.AtomicStatisticsUpdater.processRecords(AtomicStatisticsUpdater.java:176)
@ -508,7 +508,7 @@ Caused by: java.lang.NullPointerException
</ul>
</li>
</ul>
<pre tabindex="0"><code>$ grep ERROR dspace.log.2020-04-29 | cut -f 3- -d' ' | sort | uniq -c | sort -n
<pre tabindex="0"><code>$ grep ERROR dspace.log.2020-04-29 | cut -f 3- -d&#39; &#39; | sort | uniq -c | sort -n
1 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL findByUnique Error -
1 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL find Error -
1 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL query singleTable Error -
@ -524,25 +524,25 @@ Caused by: java.lang.NullPointerException
<ul>
<li>Database connections do seem high:</li>
</ul>
<pre tabindex="0"><code>$ psql -c 'select * from pg_stat_activity' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c
<pre tabindex="0"><code>$ psql -c &#39;select * from pg_stat_activity&#39; | grep -o -E &#39;(dspaceWeb|dspaceApi|dspaceCli)&#39; | sort | uniq -c
5 dspaceApi
6 dspaceCli
88 dspaceWeb
</code></pre><ul>
<li>Most of those are idle in transaction:</li>
</ul>
<pre tabindex="0"><code>$ psql -c 'select * from pg_stat_activity' | grep 'dspaceWeb' | grep -c &quot;idle in transaction&quot;
<pre tabindex="0"><code>$ psql -c &#39;select * from pg_stat_activity&#39; | grep &#39;dspaceWeb&#39; | grep -c &#34;idle in transaction&#34;
67
</code></pre><ul>
<li>I don&rsquo;t see anything in the PostgreSQL or Tomcat logs suggesting anything is wrong&hellip; I think the solution to clear these idle connections is probably to just restart Tomcat</li>
<li>I looked at the Solr stats for this month and see lots of suspicious IPs:</li>
</ul>
<pre tabindex="0"><code>$ curl -s 'http://localhost:8081/solr/statistics/select?q=*:*&amp;fq=dateYearMonth:2020-04&amp;rows=0&amp;wt=json&amp;indent=true&amp;facet=true&amp;facet.field=ip
<pre tabindex="0"><code>$ curl -s &#39;http://localhost:8081/solr/statistics/select?q=*:*&amp;fq=dateYearMonth:2020-04&amp;rows=0&amp;wt=json&amp;indent=true&amp;facet=true&amp;facet.field=ip
&quot;88.99.115.53&quot;,23621, # Hetzner, using XMLUI and REST API with no user agent
&quot;104.154.216.0&quot;,11865,# Google cloud, scraping XMLUI with no user agent
&quot;104.198.96.245&quot;,4925,# Google cloud, using REST API with no user agent
&quot;52.34.238.26&quot;,2907, # EcoSearch on XMLUI, user agent: EcoSearch (+https://search.ecointernet.org/)
&#34;88.99.115.53&#34;,23621, # Hetzner, using XMLUI and REST API with no user agent
&#34;104.154.216.0&#34;,11865,# Google cloud, scraping XMLUI with no user agent
&#34;104.198.96.245&#34;,4925,# Google cloud, using REST API with no user agent
&#34;52.34.238.26&#34;,2907, # EcoSearch on XMLUI, user agent: EcoSearch (+https://search.ecointernet.org/)
</code></pre><ul>
<li>And a bunch more&hellip; ugh&hellip;
<ul>
@ -561,10 +561,10 @@ $ ./check-spider-ip-hits.sh -f /tmp/ips -s statistics -p
<li>Then I added a few of them to the bot mapping in the nginx config because it appears they are regular harvesters since 2018</li>
<li>Looking through the Solr stats faceted by the <code>userAgent</code> field I see some interesting ones:</li>
</ul>
<pre tabindex="0"><code>$ curl 'http://localhost:8081/solr/statistics/select?q=*%3A*&amp;rows=0&amp;wt=json&amp;indent=true&amp;facet=true&amp;facet.field=userAgent'
<pre tabindex="0"><code>$ curl &#39;http://localhost:8081/solr/statistics/select?q=*%3A*&amp;rows=0&amp;wt=json&amp;indent=true&amp;facet=true&amp;facet.field=userAgent&#39;
...
&quot;Delphi 2009&quot;,50725,
&quot;OgScrper/1.0.0&quot;,12421,
&#34;Delphi 2009&#34;,50725,
&#34;OgScrper/1.0.0&#34;,12421,
</code></pre><ul>
<li>Delphi is only used by IP addresses in Greece, so that&rsquo;s obviously the GARDIAN people harvesting us&hellip;</li>
<li>I have no idea what OgScrper is, but it&rsquo;s not a user!</li>
@ -586,11 +586,11 @@ $ ./check-spider-hits.sh -f /tmp/agents -s statistics -p
<li>That&rsquo;s about 300,000 hits purged&hellip;</li>
<li>Then remove the ones with spaces manually, checking the query syntax first, then deleting in yearly cores and the statistics core:</li>
</ul>
<pre tabindex="0"><code>$ curl -s &quot;http://localhost:8081/solr/statistics/select&quot; -d &quot;q=userAgent:/Delphi 2009/&amp;rows=0&quot;
<pre tabindex="0"><code>$ curl -s &#34;http://localhost:8081/solr/statistics/select&#34; -d &#34;q=userAgent:/Delphi 2009/&amp;rows=0&#34;
...
&lt;lst name=&quot;responseHeader&quot;&gt;&lt;int name=&quot;status&quot;&gt;0&lt;/int&gt;&lt;int name=&quot;QTime&quot;&gt;52&lt;/int&gt;&lt;lst name=&quot;params&quot;&gt;&lt;str name=&quot;q&quot;&gt;userAgent:/Delphi 2009/&lt;/str&gt;&lt;str name=&quot;rows&quot;&gt;0&lt;/str&gt;&lt;/lst&gt;&lt;/lst&gt;&lt;result name=&quot;response&quot; numFound=&quot;38760&quot; start=&quot;0&quot;&gt;&lt;/result&gt;
$ for year in {2010..2019}; do curl -s &quot;http://localhost:8081/solr/statistics-$year/update?softCommit=true&quot; -H &quot;Content-Type: text/xml&quot; --data-binary '&lt;delete&gt;&lt;query&gt;userAgent:&quot;Delphi 2009&quot;&lt;/query&gt;&lt;/delete&gt;'; done
$ curl -s &quot;http://localhost:8081/solr/statistics/update?softCommit=true&quot; -H &quot;Content-Type: text/xml&quot; --data-binary '&lt;delete&gt;&lt;query&gt;userAgent:&quot;Delphi 2009&quot;&lt;/query&gt;&lt;/delete&gt;'
&lt;lst name=&#34;responseHeader&#34;&gt;&lt;int name=&#34;status&#34;&gt;0&lt;/int&gt;&lt;int name=&#34;QTime&#34;&gt;52&lt;/int&gt;&lt;lst name=&#34;params&#34;&gt;&lt;str name=&#34;q&#34;&gt;userAgent:/Delphi 2009/&lt;/str&gt;&lt;str name=&#34;rows&#34;&gt;0&lt;/str&gt;&lt;/lst&gt;&lt;/lst&gt;&lt;result name=&#34;response&#34; numFound=&#34;38760&#34; start=&#34;0&#34;&gt;&lt;/result&gt;
$ for year in {2010..2019}; do curl -s &#34;http://localhost:8081/solr/statistics-$year/update?softCommit=true&#34; -H &#34;Content-Type: text/xml&#34; --data-binary &#39;&lt;delete&gt;&lt;query&gt;userAgent:&#34;Delphi 2009&#34;&lt;/query&gt;&lt;/delete&gt;&#39;; done
$ curl -s &#34;http://localhost:8081/solr/statistics/update?softCommit=true&#34; -H &#34;Content-Type: text/xml&#34; --data-binary &#39;&lt;delete&gt;&lt;query&gt;userAgent:&#34;Delphi 2009&#34;&lt;/query&gt;&lt;/delete&gt;&#39;
</code></pre><ul>
<li>Quoting them works for now until I can look into it and handle it properly in the script</li>
<li>This was about 400,000 hits in total purged from the Solr statistics</li>
@ -607,7 +607,7 @@ $ curl -s &quot;http://localhost:8081/solr/statistics/update?softCommit=true&quo
</li>
</ul>
<pre tabindex="0"><code># mv /etc/letsencrypt /etc/letsencrypt.bak
# /opt/certbot-auto certonly --standalone --email fu@m.com -d dspacetest.cgiar.org --standalone --pre-hook &quot;/bin/systemctl stop nginx&quot; --post-hook &quot;/bin/systemctl start nginx&quot;
# /opt/certbot-auto certonly --standalone --email fu@m.com -d dspacetest.cgiar.org --standalone --pre-hook &#34;/bin/systemctl stop nginx&#34; --post-hook &#34;/bin/systemctl start nginx&#34;
# /opt/certbot-auto revoke --cert-path /etc/letsencrypt.bak/live/dspacetest.cgiar.org/cert.pem
# rm -rf /etc/letsencrypt.bak
</code></pre><ul>
@ -618,11 +618,11 @@ $ curl -s &quot;http://localhost:8081/solr/statistics/update?softCommit=true&quo
<ul>
<li>But I don&rsquo;t see a lot of connections in PostgreSQL itself:</li>
</ul>
<pre tabindex="0"><code>$ psql -c 'select * from pg_stat_activity' | grep -o -E '(dspaceWeb|dspaceApi|dspaceCli)' | sort | uniq -c
<pre tabindex="0"><code>$ psql -c &#39;select * from pg_stat_activity&#39; | grep -o -E &#39;(dspaceWeb|dspaceApi|dspaceCli)&#39; | sort | uniq -c
5 dspaceApi
6 dspaceCli
14 dspaceWeb
$ psql -c 'select * from pg_stat_activity' | wc -l
$ psql -c &#39;select * from pg_stat_activity&#39; | wc -l
30
</code></pre><ul>
<li>Tezira said she cleared her browser cache and then was able to submit again