< Niklaus.20210310-davaz_com | Index | Niklaus.20210126-ruby-30 >>
Removing /service/currency which had a run file containing exec sudo -u apache /usr/local/bin/ruby-300 /usr/local/ruby-3.0.0/bin/currencyd
.
Then stopping and removing everyghing for currency
cd /service/currency rm /service/currency svc -dx . log ps -ef | grep currency # to ensure that not currency daemon is still working rm -rf /etc/currency
As seen in the screenshot posted under https://github.com/zdavatz/oddb.org/issues/130 our SBSM sessions vary every 5 seconds between 70+ and 1200+.
In src/util/oddbapp.rb
I took a look at the log_size method, which is called every 5 seconds to to a garbage collection and reporting the used sessions, threads and memory. Also the memory goes always from 1200 to over 3000 and down. Is Ruby 3.0 much more aggressive about cleaning memory or is our implementation of the SBSM::SessionStore causing unneeded allocations/frees?
Remarked that the file /var/www/oddb.org/doc/resources/downloads/status_crawler
was last updated on januar 2021. After adding -e "APPNAME='crawler'"
in /service/ch.oddb-crawler/run
and restarting /service/ch.oddb
the memory stayed at less than 1400MB for status_oddb.
As described in issue 128 we have two examples:
In both cases we find in the displayed atc a short variant of the ATC-Code, namely R03DX or A16AX. In swissmedic.rb I find that we ignore differences in the ATC-Class.
But in text_info.rb we find the only occurrence, where we call create_atc_class.
Therefore we have to problems to solve:
Running sudo -u apache bundle-300 exec ruby-300 jobs/update_textinfo_swissmedicinfo --target=fi --reparse 66108
to answer the first question.
Found the culprit. Now I have the following log entry 2021-02-02 14:23:33 +0100: /var/www/oddb.org/src/plugin/text_info.rb:210:in `block in ensure_correct_atc_code': ensure_correct_atc_code iksnr 66108 save atcFromFI A16AX14 in sequence 66108 sequence 01 atc_class 45978074
in ./log/oddb/debug/2021/02.log
Pushed commit Create new atc_class if atcFromFI != !atcFromXml
Corrected src/plug/swissmedic.rb to catch a situation where a ATC-Code must be created, too.
Fixed src/plug/who.rb to create correctly a new ATC-Code.
Adding a new ATC-code via the admin view was never possible, and it would take me several hours to fix it.
Pushed the following commits: