Closed vikin91 closed 7 years ago
Possibly-useful hints: https://groups.google.com/forum/#!msg/mojolicious/T9uH9a14CHM/Ujqpc2EPBgAJ
Starting BibSpace like seemed to cause no problems (but it does):
BIBSPACE_USE_DUMP=1 bin/bibspace daemon -m production -l http://*:8080
BIBSPACE_USE_DUMP=1 bin/bibspace daemon -m production -w 2 -l http://*:8080
but like this does:
BIBSPACE_USE_DUMP=1 bin/bibspace prefork -m production -w 2 -l http://*:8080
BIBSPACE_USE_DUMP=1 bin/bibspace prefork -m production -w 4 -c 10 -l http://*:8080
... and using hypnotoad do cause problems - even with single worker.
Testing called like this can reproduce problems:
BIBSPACE_CONFIG=/etc/bibspace_test.conf bin/bibspace test
Testing with prove
seems to not discover the problems.
bin/bibspace daemon -l http://*:8080
causes problems on linux as well... this must be something else.
Next trait: this problem seems to be related with USE_BISPACE_DUMP
and restoring backups. By restoration, the UIdProvider seems to be duplicated. Is this only a fixture error??
The problem seems to be located in:
package BibSpace::Functions::FDB;
...
my $drh = DBI->install_driver("mysql");
my $rc = $drh->func( 'dropdb', $db_database, $db_host, $db_user, $db_pass, 'admin' );
my $rc = $drh->func( 'createdb', $db_database, $db_host, $db_user, $db_pass, 'admin' );
Need more tests to make sure it is fixed now.
Starting the app on the test server using command:
BIBSPACE_CONFIG=/etc/bibspace_test.conf BIBSPACE_USE_DUMP=0 MOJO_MODE=development hypnotoad -f bin/bibspace
seems to cause no problems.
Starting it with sudo service bibspace-test start
(runs as root) causes problems.
Maybe the issue is caused by sudo/root? Or maybe BIBSPACE_USE_DUMP=1
is the problem?
It seemed to be a problem with keeping some objects inside mojolicious has
function. The function is executed only once at startup and during layer replacement the original object is not replaced with the new one, but exists alongside with it. This seems to be fixed finally in 4a0a63e
The address in memory of Tag ID Provider changes during operation...