session lock feedback - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: session lock feedback (/showthread.php?tid=73097) |
session lock feedback - makif - 03-19-2019 hi everyone i want to give feedback when query takes long and user session locked, i mean like "you should wait until query ends" i have tried but no results for me i have get_lock function in those pages
i guess "SELECT GET_LOCK('".$arg."', 300) AS ci_session_lock")->row()->ci_session_lock" is locked my session but i did comment that line nothing is affected thanks for suggestions RE: session lock feedback - wjonker - 03-19-2019 Hey, I'am not shure I do understand your questen correct. But the documentation mention's that they use session for the following reason : "non-blocking requests in the context of sessions also means unsafe, because modifications to session data (or session ID regeneration) in one request can interfere with the execution of a second, concurrent request. This detail was at the root of many issues and the main reason why CodeIgniter 3.0 has a completely re-written Session library." Source : https://codeigniter.com/userguide3/libraries/sessions.html#a-note-about-concurrency RE: session lock feedback - makif - 03-19-2019 (03-19-2019, 03:33 AM)wjonker Wrote: Hey, thanks for reply but i read documents and i know why ci use get_lock, so it wont solve my problem i just want to give feedback to users when session locks. for example query takes time about 5 minutes and user click another request, i want to give feedback like "the last request is running, you should wait for this" RE: session lock feedback - php_rocs - 03-20-2019 @makif, My question is more about the query. Why is it taking so long? RE: session lock feedback - makif - 03-28-2019 (03-20-2019, 06:57 AM)php_rocs Wrote: @makif,user search about a year query and many conditions it takes a little bit long and also i use exit in get_lock function on mysql database_driver page but not working, it turned query to me :/ how can i learn when session lockes RE: session lock feedback - php_rocs - 03-28-2019 @makif, Are you using AWS? What version of CI? Database? RE: session lock feedback - makif - 03-28-2019 (03-28-2019, 06:34 AM)php_rocs Wrote: @makif, i am using nginx, also apache 2.4 at another place for testing CI version is 3.1.8 database mariadb 10.3.12 |