Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
14874Bug reportsInstallationpublic2019-11-15 11:10
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionreopened 
Product Version4.0.0dev 
Fixed in Version4.0.0-beta 
Summary14874: This DB send a 504 when upgrade …
Description

When trying to upgrade i receive 504 error … (and don't find error in log … i try too with hacking index to get all errors)
Sorry … for this lack of informations …

Steps To Reproduce

Import this DB, try to setup/update with this DB

Additional Information

Potential issue

  1. skelvanilla set as default temple
  2. Lot of plugin not in plugin directory
  3. Lot of DB table ?

After reloading : seems better (see the screenshots)

TagsNo tags attached.
Attached Files
ls_master.sql.zip (1,589,139 bytes)
lime_answers.sql (180,367 bytes)
Bug heat6
Complete LimeSurvey version number (& build)4.0.0 github e7f3dd9
I will donate to the project if issue is resolvedNo
BrowserFF 66
Database type & version10.3.12-MariaDB (mysqlnd 5.0.12-dev)
Server OS (if known)fedora/linux
Webserver software & version (if known)nginx/1.14.2
PHP Version7.2.17

Relationships

related to 14926 closeddominikvitt Feature requests Don't set encrypted firstname + lastname column by default 

Activities

DenisChenu

DenisChenu

2019-05-09 15:36

developer   ~51856

Before Capture d’écran du 2019-05-09 15-31-56.png i have ngynx 504 issue

dominikvitt

dominikvitt

2019-05-09 16:51

developer   ~51857

I'm having PHP warning: Creating default object from empty value

I'll try to fix it.

PHP warning.html (5,028 bytes)   
<script type="text/javascript" src="/assets/packages/bootstrap/plugins/switch/js/bootstrap-switch.js"></script>
<script type="text/javascript" src="/assets/packages/bootstrap/plugins/datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="/third_party/jquery-ui/jquery-ui.structure.css" />
<link rel="stylesheet" type="text/css" href="/assets/fonts/font-src/fontawesome/css/font-awesome.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/yiistrap.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/plugins/switch/css/bootstrap-switch.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/plugins/select2/css/select2.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/plugins/select2/css/select2-bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/bootstrap/plugins/datetimepicker/build/css/bootstrap-datetimepicker.css" />
<link rel="stylesheet" type="text/css" href="/assets/fonts/roboto.css" />
<link rel="stylesheet" type="text/css" href="/assets/fonts/icomoon.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/adminbasics/build/adminbasics.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/adminsidepanel/build.min/css/main.css" />
<link rel="stylesheet" type="text/css" href="/assets/packages/lstutorial/build/lstutorial.css" />
<link rel="stylesheet" type="text/css" href="/themes/admin/Sea_Green/css/lime-admin-colors.css" />
<link rel="stylesheet" type="text/css" href="/themes/admin/Sea_Green/css/statistics.css" />
<script type='text/javascript'>window.debugState = {frontend : (0 === 1), backend : (0 === 1)};</script><script type="text/javascript" src="/third_party/jquery/jquery-3.1.1.js" class="headScriptTag"></script>
<script type="text/javascript" src="/third_party/jquery/jquery-migrate-3.0.0.js" class="headScriptTag"></script>
<script type="text/javascript" src="/third_party/jquery-ui/jquery-ui.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/adminbasics/build/adminbasics.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/adminsidepanel/build/js/adminsidepanel.js" class="headScriptTag"></script>
<script type="text/javascript" src="/tmp/assets/bb276800/js.cookie.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/bootstrap/bootstrap.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/bootstrap/plugins/bootstrapconfirm/bootstrapconfirm.js" class="headScriptTag"></script>
<script type="text/javascript" src="/third_party/moment/moment-with-locales.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/bootstrap/plugins/select2/js/select2.full.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/lslog/build/lslog.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/pjax/pjax.js" class="headScriptTag"></script>
<script type="text/javascript" src="/assets/packages/pjax/loadPjax.js" class="headScriptTag"></script>
<script type="text/javascript">
/*<![CDATA[*/

           LS.globalUserId = "";
/*]]>*/
</script>
<!-- BEGIN LAYOUT_MAIN --><div class="container-fluid">
    <div class="row">
        <div id="notif-container" class="col-sm-12 content-right" style="z-index: 999">
                    </div>
    </div>
</div> <div id="pjax-file-load-container" class="ls-flex-row col-12"><div style="height:2px;width:0px;"></div></div><!-- Full page, started in Survey_Common_Action::render_wrapped_template() -->
                    <div class="container-fluid full-page-wrapper" id="in_survey_common_action">
                        </div><!-- END LAYOUT_MAIN --><script type="text/javascript" src="/assets/packages/lstutorial/build/lstutorial.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
jQuery('body').popover({'selector':'a\x5Brel\x3Dpopover\x5D'});
jQuery('body').tooltip({'selector':'a\x5Brel\x3Dtooltip\x5D'});
jQuery(document).off('pjax:scriptsuccess.debugger').on('pjax:scriptsuccess.debugger',function(e) { console.ls.log('PJAX scriptsuccess', e); });
jQuery(document).off('pjax:scripterror.debugger').on('pjax:scripterror.debugger',function(e) { console.ls.log('PJAX scripterror', e); });
jQuery(document).off('pjax:scripttimeout.debugger').on('pjax:scripttimeout.debugger',function(e) { console.ls.log('PJAX scripttimeout', e); });
jQuery(document).off('pjax:success.debugger').on('pjax:success.debugger',function(e) { console.ls.log('PJAX success', e);});
jQuery(document).off('pjax:error.debugger').on('pjax:error.debugger',function(e) { console.ls.log('PJAX error', e);});
/*]]>*/
</script>
</body>
    </html>
PHP warning.html (5,028 bytes)   
DenisChenu

DenisChenu

2019-05-09 17:50

developer   ~51858

Not related to this issue but:

  1. How you have this issue ?
  2. How you do the html ? What browser (seems a partial HTML
dominikvitt

dominikvitt

2019-05-10 13:48

developer   ~51860

Upgrade errors are fixed:
https://github.com/LimeSurvey/LimeSurvey/commit/35b080c32d871938c187410923432f7dccda3859

@DenisChenu: Try again!

DenisChenu

DenisChenu

2019-05-11 12:03

developer   ~51902

Last edited: 2019-05-11 12:41

Still have issue

No slow query

Have some warning

2019-05-11 12:01:00 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2019-05-11 12:01:00 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2019-05-11 12:01:00 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2019-05-11 12:01:00 0 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name.  Please run mysql_upgrade
2019-05-11 12:01:00 0 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name.  Please run mysql_upgrade

I try more log

DenisChenu

DenisChenu

2019-05-11 12:39

developer   ~51903

Last edited: 2019-05-11 12:41

Due to time limit in conexion between ngynx and PHP : after 504 error : DB still updated …
I think we must cut in different part all DB update : all i10n update take a very long time

504 during INSERT answer_i10n …

DenisChenu

DenisChenu

2019-05-11 18:25

developer   ~51905

Last edited: 2019-05-11 18:25

@dominikvitt : i think only step by step upgrade can be done
1 solutions

  • Update to next link
  • Update step by step in ajax

The 2 need updateing https://github.com/LimeSurvey/LimeSurvey/blob/35b080c32d871938c187410923432f7dccda3859/application/helpers/update/updatedb_helper.php#L29

db_upgrade_all($iOldDBVersion, $bSilent = false, $steps= null)
or
db_upgrade_all($iOldDBVersion, $bSilent = false, $toVersion= null)

You can give me (still i can't work on Survey curently)
The 1st is more easy (just a counter)

DenisChenu

DenisChenu

2019-05-12 17:27

developer   ~51907

Last edited: 2019-05-12 17:36

Only 400 upgrade broke, due to a lot of foreach …

Maybe find another way than doinf a foreach ?

INSERT INTO answertemp (qid, code, scale_id)
SELECT answer.qid, answer.code, answer.scale_id
FROM answer (JOIN answer answerdouble WHERE  …)

Or …
a dirty

                echo &quot;.&quot;;
                ob_flush();
                flush();
                ob_flush();
                flush();

And updat it via ajax ?

ollehar

ollehar

2019-05-13 10:56

administrator   ~51909

Problem: Reaching max execution time will not do a transaction rollback.

Solutions:

1) Set max execution time to 0 (infinite) before db ugprade, restore after done.
2) Check how long the script has run, throw exception if too close to max execution time.

ollehar

ollehar

2019-05-13 10:57

administrator   ~51910

A separate issue is the lack of feedback during upgrade. A solution would be flushing the buffer, as you say, Denis.

ollehar

ollehar

2019-05-13 11:02

administrator   ~51911

Some different hacks are available in the comment section here: https://php.net/manual/en/function.set-time-limit.php

DenisChenu

DenisChenu

2019-05-13 11:13

developer   ~51912

Last edited: 2019-05-13 11:14

I already use set_time_limit in a foreach instruction on one of my plugin : it's better than set to 0.

Here : i don't think it'a set_time_limit , since it's set as 1200 … via config.php : https://github.com/LimeSurvey/LimeSurvey/blob/9419b901de451fdef5c017a31611c434ba88711f/application/core/LSYii_Controller.php#L104

PS: PHP script still working after 504 : it's NOT a php issue …

Else : this commit : https://github.com/LimeSurvey/LimeSurvey/pull/1278 really improve 400 upgrade : it's OK on my server with thgis DB.

We still need a ajax/step system but don't use a foreach question/group/answers make it very quickest.

ollehar

ollehar

2019-05-13 11:29

administrator   ~51913

Hm.

DenisChenu

DenisChenu

2019-05-13 14:20

developer   ~51924

For speed comparaison

~24s
simplescreenrecorder-2019-05-13_14.09.10

VS more than 4 minutes
https://framadrop.org/r/96zPJgI2K_#xyBwlCppuBIDUL34DegO+ypolcuqaK4/7bPLWL4EcqA=

With my local computer

DenisChenu

DenisChenu

2019-05-15 01:10

developer   ~51938

Broken lime_answers ( updating manually scale_id and sort_order on qid : 4599). since scale_id and sort_order are not in pk : can happen.

DenisChenu

DenisChenu

2019-05-22 20:01

developer   ~52057

All done https://github.com/LimeSurvey/LimeSurvey/pull/1282

The DB action (method) are done on https://github.com/Shnoulle/Test-LS-checkDbForUpgrade

Checked on PGSQL 9.1.24 (little DB but with multi language)

  • [x] Questions update
  • [x] Groups update
  • [x] Answers update
  • [x] Labels update
  • [x] DefaultValues update

Checked on PGSQL 10 (little DB but with multi language)

  • [x] Questions update
  • [x] Groups update
  • [x] Answers update
  • [x] Labels update
  • [x] DefaultValues update

Checked on OBDC 11 - MS SQLServer 12

  • [x] Questions update
  • [x] Groups update
  • [x] Answers update
  • [x] Labels update
  • [x] DefaultValues update

On MariaDB 10.3.12

  • [x] Questions update
  • [x] Groups update
  • [x] Answers update
  • [x] Labels update
  • [x] DefaultValues update

Checked on Mysql 5.6.39-1

  • [x] Questions update
  • [x] Groups update
  • [x] Answers update
  • [x] Labels update
  • [x] DefaultValues update
DenisChenu

DenisChenu

2019-06-03 08:23

developer   ~52268

https://github.com/LimeSurvey/LimeSurvey/commit/932542f82bf0fc32f99dfea139d485a742b25162

Issue History

Date Modified Username Field Change
2019-05-09 15:36 DenisChenu New Issue
2019-05-09 15:36 DenisChenu File Added: Capture d’écran du 2019-05-09 15-29-14.png
2019-05-09 15:36 DenisChenu File Added: Capture d’écran du 2019-05-09 15-31-56.png
2019-05-09 15:36 DenisChenu File Added: Capture d’écran du 2019-05-09 15-32-11.png
2019-05-09 15:36 DenisChenu File Added: ls_master.sql.zip
2019-05-09 15:36 DenisChenu Note Added: 51856
2019-05-09 16:51 dominikvitt File Added: PHP warning.html
2019-05-09 16:51 dominikvitt Note Added: 51857
2019-05-09 17:50 DenisChenu File Added: Capture d’écran du 2019-05-09 17-50-36.png
2019-05-09 17:50 DenisChenu Note Added: 51858
2019-05-10 13:48 dominikvitt Note Added: 51860
2019-05-10 15:41 c_schmitz Assigned To => dominikvitt
2019-05-10 15:41 c_schmitz Status new => resolved
2019-05-10 15:41 c_schmitz Resolution open => fixed
2019-05-11 12:03 DenisChenu Status resolved => feedback
2019-05-11 12:03 DenisChenu Resolution fixed => reopened
2019-05-11 12:03 DenisChenu Note Added: 51902
2019-05-11 12:39 DenisChenu Note Added: 51903
2019-05-11 12:39 DenisChenu Status feedback => assigned
2019-05-11 12:41 DenisChenu Note Edited: 51902
2019-05-11 12:41 DenisChenu Note Edited: 51903
2019-05-11 18:25 DenisChenu Note Added: 51905
2019-05-11 18:25 DenisChenu Note Edited: 51905
2019-05-12 17:27 DenisChenu Note Added: 51907
2019-05-12 17:35 DenisChenu Note Edited: 51907
2019-05-12 17:36 DenisChenu Note Edited: 51907
2019-05-13 10:56 ollehar Note Added: 51909
2019-05-13 10:57 ollehar Note Added: 51910
2019-05-13 11:02 ollehar Note Added: 51911
2019-05-13 11:13 DenisChenu Note Added: 51912
2019-05-13 11:14 DenisChenu Note Edited: 51912
2019-05-13 11:29 ollehar Note Added: 51913
2019-05-13 14:20 DenisChenu File Added: simplescreenrecorder-2019-05-13_14.09.10.webm
2019-05-13 14:20 DenisChenu Note Added: 51924
2019-05-15 00:45 DenisChenu Assigned To dominikvitt => DenisChenu
2019-05-15 01:10 DenisChenu Note Added: 51938
2019-05-15 01:10 DenisChenu File Added: lime_answers.sql
2019-05-22 19:59 DenisChenu Relationship added related to 14926
2019-05-22 20:01 DenisChenu Note Added: 52057
2019-06-03 08:23 DenisChenu Status assigned => resolved
2019-06-03 08:23 DenisChenu Fixed in Version => 4.0.0-beta
2019-06-03 08:23 DenisChenu Note Added: 52268
2019-11-15 11:10 c_schmitz Status resolved => closed