view · edit · sidebar · attach · print · history

Index>

20161030-deleteBauerfeindTakesTooLong

Summary

  • www.steinwies.ch or www.davaz.com show sometimes an empty page
  • Deleting bauerfeind products takes too long
  • Keep in Mind

Commits

Index

Deleting bauerfeind products takes too long

Zeno remarked in the logs

2016-08-25 20:50:38 +0200: delete_all_bauerfeind_products. 457734727638 4046445401473
2016-08-25 20:52:44 +0200: delete_all_bauerfeind_products. 457764727584 4046445401428

As deleting all products takes much less time he considers this, to be way too long.

As the job finishes correctly, we will not investigate this problem further.

www.steinwies.ch or www.davaz.com show sometimes an empty page

Sometimes www.steinwies.ch or davaz.com display an empty (white) pages. This seems to occur mainly, when both pages are opened.

Looking at /var/www/steinwies.ch/log/2016/10/03/error_log on fastpower I see

[Mon Oct 03 00:26:22 2016] [error] [client 148.0.254.160] File does not exist: /var/www/steinwies.ch/doc/wp-login.php
[Mon Oct 03 07:19:05 2016] [error] [client 66.249.76.127] File does not exist: /var/www/steinwies.ch/doc/m

Looking at the access log I find

grep -c 77.57.3.67 /var/www/new.davaz.com/log/access_log /var/www/steinwies.ch/log/access_log 
/var/www/new.davaz.com/log/access_log:202
/var/www/steinwies.ch/log/access_log:8

where 77.57.3.67 is the public visible IP address of my PC.

And

77.57.3.67 - - [03/Oct/2016:08:46:07 +0200] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:46:07 +0200] "GET /favicon.ico HTTP/1.1" 200 1406 "http://steinwies.ch/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:47:41 +0200] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:47:41 +0200] "GET /favicon.ico HTTP/1.1" 200 1406 "http://steinwies.ch/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:48:15 +0200] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:48:15 +0200] "GET /favicon.ico HTTP/1.1" 200 1406 "http://www.steinwies.ch/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.113 Safari/537.36"
77.57.3.67 - - [03/Oct/2016:08:49:14 +0200] "GET / HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
77.57.3.67 - - [03/Oct/2016:08:49:14 +0200] "GET /favicon.ico HTTP/1.1" 200 1406 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

Will set up a copy of steinwies.ch and davaz.com on my gentoo system to investigate the problem. I must use Ruby 2.3.1

Steps are (following the README.md):

todo:

  • Adding hosts steinwies.ngiger.ch and davaz.ngiger.ch in
    • /etc/conf.d/hostname and calling sudo service hostname restart
    • copied /etc/apache2/vhosts.d/steinwies.ch.conf from fastpower and adapted ServerName to steinwies.ngiger.ch
    • sudo emerge --ask dev-python/pip
    • sudo pip install nodejs
    • sudo gem231 install bundler
    • cd /var/www/steinwies.ch
    • sudo -u apache /usr/local/bin/bundle install --path vendor
    • sudo -u apache /usr/local/bin/bundle exec bin/steinwies # To test the start. Complains about missing /var/www/steinwies.ch/etc/config.yml
    • Changing mailer to my ngiger@ywesee.com address in /var/www/steinwies.ch/etc/config.yml
    • sudo -u apache mkdir -p log webalizer
    • sudo -u apache /usr/local/bin/bundle exec bin/steinwies # does not work yet

I am getting the following display

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache Server at steinwies.ngiger.ch Port 80

Found the reason (Ruby version mismatch) in /var/www/steinwies.ch/log/error_log

==> log/error_log <==
[Mon Oct 03 10:51:32 2016] [error] mod_ruby: error in ruby
[Mon Oct 03 10:51:32 2016] [error] mod_ruby: /var/www/oddb.org/src/util/persistence.rb:11: undefined method `key' for class `Hash' (NameError)
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /var/www/oddb.org/src/util/config.rb:5
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /var/www/steinwies.ch/doc/index.rbx:5
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `load'
[Mon Oct 03 10:51:32 2016] [error] mod_ruby:   from /usr/local/bin/ruby186/lib/ruby/1.8/apache/ruby-run.rb:53:in `handler'

Ruby 1.8.6 fails to require 'util/persistence'.

Also I do not understand why we should read for steinwies the DRB-Server-URL from the config, whereas for sandoz, etc we use the Apache config to set the environment variable DRB_SERVER.

I also think that no GEM from ruby 2.3.1 should be present in the Apache config, as mod_ruby uses Ruby 1.9.

Do isolate the proble I stop all /services, move all vhosts.d/*.conf files (execpt the *default*.conf and steinwies.ch.conf) to vhosts.inactive and restart apache2. Now http://steinwies.ngiger.ch/ works fine, whether we specify RubyAddPath /var/www/steinwies.ch/vendor/ruby/2.3.0/gems/sbsm-1.3.0/lib or RubyAddPath /usr/local/lib/ruby/gems/2.3.0/gems/sbsm-1.3.0/lib in the apache steinwies.ch.conf.

Now I am installing davaz.com, too.

Calling bundle install fails, because mysql is not installed.

sudo emerge mysql has Blocked packeage. Calling sudo emerge --sync updates /usr/portage. Had to remove git and update perl to 5.22, uncommenting the init scripts to make emerge mysql pass.

Adding -python allowed emerge git to finish. At the moment added it to /etc/portage/make.conf USE flags. It would probably better to add it via a line dev-vcs/git -python in /etc/portage/package.use/default sudo -u apache /usr/local/bin/bundle install --path=vendor in /var/www/davaz.com return

<..>
current directory: /var/www/davaz.com/vendor/ruby/2.3.0/gems/mysql2-0.4.4/ext/mysql2
make "DESTDIR="
compiling mysql2_ext.c
compiling result.c
compiling infile.c
compiling client.c
compiling statement.c
linking shared-object mysql2/mysql2.so
/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/local/lib/libssl.a(t1_srvr.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libssl.a: could not read symbols: Bad value
collect2: Fehler: ld gab 1 als Ende-Status zurück
Makefile:254: die Regel für Ziel „mysql2.so“ scheiterte
make: *** [mysql2.so] Fehler 1

make failed, exit code 2

Gem files will remain installed in /var/www/davaz.com/vendor/ruby/2.3.0/gems/mysql2-0.4.4 for inspection.
Results logged to /var/www/davaz.com/vendor/ruby/2.3.0/extensions/x86_64-linux/2.3.0/mysql2-0.4.4/gem_make.out

This libssl.a was installed for ruby 1.8.6 in May. Removing libssl.a and libcrypto.a in /usr/local/lib64. Now bundle install works. Restarting apache failed because of missing log/webalizer directories. Fixed with sudo rmdir webalize log/. Now I land in http://davaz.ngiger.ch/resources/errors/appdown.html. In the error log I see that I cannot access drbssl://localhost:9997 and access to /en/personal/home failed for (null). Will continue tomorrow.

view · edit · sidebar · attach · print · history
Page last modified on October 03, 2016, at 05:07 PM