Project

General

Profile

Actions

Support #7852

closed

Bad User-Feedback when Store: USER - U times out

Added by Nicola Chiapolini about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Carsten Rose
Target version:
Start date:
11.02.2019
Due date:
% Done:

0%

Estimated time:
Discuss:
Prio Planung:
Vote:

Description

On Login, we fill several constants into U. When a browser session is inactive for a few minutes,
the store gets lost, and the queries using the constants fail.

However the user only gets a generic SQL Error message. This generates several support requests
that can be solved by logging out and back in.

Could users automatically be informed about the timeout?

Ideas for solutions
  • We could add an element to each page that checks for some constant and redirects otherwise (ugly and probably often forgotten)
  • Put something in QFQ that checks if the session store expires
  • Auto-Logout users from Typo3 after the correct amount of time

Related issues

Is duplicate of QFQ - Bug #7634: Session Timeout zu kurzClosedCarsten Rose11.01.2019

Actions
Actions #1

Updated by Carsten Rose about 5 years ago

  • Assignee set to Carsten Rose
  • Target version set to 146

Hallo Nicola

ja das ist erst drin seitdem wir den custom timeout pro Form eingebaut haben. Da ist etwas schief gelaufen. Frueher gab es keine Probleme. Ich denke wenn wir den alten Zustand wieder herstellen ist brauchen wir keine 'workarounds'. Was denkst Du?

CU
Carsten

Actions #2

Updated by Nicola Chiapolini about 5 years ago

Hoi Carsten

ja das ist erst drin seitdem wir den custom timeout pro Form eingebaut
haben.

Ok. Einfach um sicherzugehen das betrifft nicht nur Forms sonder jeglichen
Reports.

Da ist etwas schief gelaufen. Frueher gab es keine Probleme. Ich
denke wenn wir den alten Zustand wieder herstellen brauchen wir keine
'workarounds'. Was denkst Du?

Einverstanden. Wenn der Store zuverlässig erhalten bleibt, müssen wir auch
nicht kontrollieren, ob er fehlt :-) Für uns wäre es hilfreich, wenn das
möglichst bald korrigiert werden könnte. Das verursacht an diversen Orten
Probleme. (u.a. auch Mails die manchmal nicht verschickt werden)

Ich bin aber für den Rest der Woche abwesend. Ein neues Release werde ich also
frühestens am Montag einspielen.

härzlichi Grüäss
Nicola

Actions #3

Updated by Carsten Rose about 5 years ago

  • Related to Bug #7634: Session Timeout zu kurz added
Actions #4

Updated by Carsten Rose about 5 years ago

  • Related to deleted (Bug #7634: Session Timeout zu kurz)
Actions #5

Updated by Carsten Rose about 5 years ago

  • Is duplicate of Bug #7634: Session Timeout zu kurz added
Actions #6

Updated by Carsten Rose about 5 years ago

  • Status changed from New to Rejected
Actions #7

Updated by Carsten Rose about 5 years ago

  • Target version changed from 146 to 19.2.1
Actions #8

Updated by Nicola Chiapolini about 5 years ago

Update: Ich habe unterdessen 19.2.1 installiert, das Problem tritt aber immer noch auf. Ich vermute das ist also doch etwas anderes als #7634. Deshalb noch einmal genauer:

Wir haben in der DB diverse Konstanten definiert. Nachdem Login wird der User auf eine Seite mit einem QFQ-Element weitergeleitet, das alle Konstenten in den U-Store lädt:

1.sql = SELECT label FROM _constants
1.content = hide
1.1.sql = SELECT value AS '_={{label:R}}' FROM _constants WHERE label='{{label:R}}'

danach wird der User automatisch auf die Startseite weitergeleitet.

Wenn ein User nun lange eingeloggt ist und danach eine Seite aufruft, die die eine Konstante aus dem U-Store verwendet, schlägt das jeweils fehl mit einem "SQL error"
Beispiel mit BE-Login:


Debug
toUser SQL error
support HINT: The following variables couldn't be replaced: {{phd_warn_due_days:U}}, {{phd_review_level:U}}
os [ mysqli: 1064 ] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '{phd_warn_due_days:U}} DAY)) AS soon, (ms.due_date <= NOW()) AS missed, CONCAT(m' at line 1
[...]

Ideen, wie wir das elegant lösen könnten?

Actions #9

Updated by Carsten Rose about 5 years ago

  • Status changed from Rejected to Feedback
  • Target version changed from 19.2.1 to 146

Hallo Nicola

das ist ja ein interessantes Setup.

Evtl. ist es ein PHP Session expire (QFQ PHP Session) - bei Debian laueft ja ein CRON garbage collection. Der wiederum nimmt (Vermutung) das CLI php.ini als Basis fuer die Expiration - ist web und cli identisch gesetzt (session.gc_maxlifetime)? Wie hoch?

Testcase: starte mal einen Webseite Aufruf (mit einem QFQ Element), bestimme die QFQ Session Datei (Cookie, PHP/Debian), rufe die Seite dann nicht mehr auf, und lasse ein Skript laufen das einmal pro Minute loggt ob die Datei noch da ist. Dann wueren wir wissen was fuer ein Timeout wir haben. Mit der Angabe koennen wir dann in den PHP Settings / Google suchen.

Vielen Dank

CU
Carsten

Actions #10

Updated by Nicola Chiapolini about 5 years ago

Habe nun eben mal geschaut, was ich finden kann. Schreib mir, falls ich sonst noch einen Wert nachschauen soll - ich habe keinen Überblick, was da noch alles relevant sein könnte...

php.ini
nchiapol@mnf-32: /etc/php/7.0 $ grep cookie_lifetime */php.ini
apache2/php.ini:session.cookie_lifetime = 0
cli/php.ini:session.cookie_lifetime = 0

nchiapol@mnf-32: /etc/php/7.0 $ grep ^session.gc_ */php.ini
apache2/php.ini:session.gc_probability = 0
apache2/php.ini:session.gc_divisor = 1000
apache2/php.ini:session.gc_maxlifetime = 1440
cli/php.ini:session.gc_probability = 0
cli/php.ini:session.gc_divisor = 1000
cli/php.ini:session.gc_maxlifetime = 1440

typo3
install tool / all configurations
[FE][lifetime] = 0
[FE][sessionDataLifetime] = 86400
[FE][permalogin] = 0

install tool / system environment / phpinfo
session.gc_maxlifetime 7200 1440

qfq-extension / config / security
security.sessionTimeoutSeconds: 1440

php-script
phpinfo() run from php-script in typo3 root folder
session.gc_maxlifetime 1440 1440

testcase
root@mnf-32:/var/lib/php/sessions# while true; do date; ls -l sess_43sali7npgcmbnumf75fo4aj93; sleep 30; done
[...]
Mon Mar 4 18:08:32 CET 2019
-rw------- 1 www-data www-data 663 Mar 4 17:35 sess_43sali7npgcmbnumf75fo4aj93
Mon Mar 4 18:09:02 CET 2019
-rw------- 1 www-data www-data 663 Mar 4 17:35 sess_43sali7npgcmbnumf75fo4aj93
Mon Mar 4 18:09:32 CET 2019
ls: cannot access 'sess_43sali7npgcmbnumf75fo4aj93': No such file or directory
Mon Mar 4 18:10:02 CET 2019
ls: cannot access 'sess_43sali7npgcmbnumf75fo4aj93': No such file or directory
Mon Mar 4 18:10:32 CET 2019
ls: cannot access 'sess_43sali7npgcmbnumf75fo4aj93': No such file or directory
Mon Mar 4 18:11:02 CET 2019
-rw------- 1 www-data www-data 224 Mar 4 18:10 sess_43sali7npgcmbnumf75fo4aj93
Mon Mar 4 18:11:32 CET 2019
-rw------- 1 www-data www-data 749 Mar 4 18:11 sess_43sali7npgcmbnumf75fo4aj93

(neu erstelltes file nach reload enthält die relevanten Daten nicht,
da der reload die entsprechende Seite nicht öffnet.)

Actions #11

Updated by Carsten Rose about 5 years ago

Hallo Nicola

Danke fuer die Tests - das klaert alles.

  • Session File wurde um 17:35 angelegt.
  • Um 18:09:32 verschwindet es (Garbage Collection).
  • Das es um 18:11:02 wieder auftaucht verstehe ich nicht - evtl. hat das etwas mit einem versuchten neuladen der Seite zu tun.

Du hast einen Timeout von 24 Minuten (1440 Sekunden) - das passt gut mit den obigen Werten.

Setze den Timeout z.B. mal auf einen Tag:

/etc/php/7.0/apache2/php.ini: session.gc_maxlifetime = 86400
/etc/php/7.0/cli/php.ini:     session.gc_maxlifetime = 86400

Apache neustarten.

In T3/BE > Extension > QFQ > Setup : security.sessionTimeoutSeconds leer lassen, dann wird das PHP Setting genommen.

HTH

CU
Carsten

Actions #12

Updated by Carsten Rose about 5 years ago

  • Status changed from Feedback to Closed
Actions #13

Updated by Carsten Rose about 5 years ago

  • Target version changed from 146 to 19.3.1
Actions

Also available in: Atom PDF