Welcome Guest, Not a member yet? Register   Sign In
session lock feedback
#1

(This post was last modified: 03-19-2019, 12:25 AM by makif.)

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
  • Session_database_driver.php 
  • Session_memcached_driver.php
  • session_redis_driver.php
  • Session_driver.php
i have tried which function works when session locks but i dont find.
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
Reply
#2

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/libra...oncurrency
Reply
#3

(03-19-2019, 03:33 AM)wjonker Wrote: 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/libra...oncurrency

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"
Reply
#4

@makif,

My question is more about the query. Why is it taking so long?
Reply
#5

(This post was last modified: 03-28-2019, 03:56 AM by makif.)

(03-20-2019, 06:57 AM)php_rocs Wrote: @makif,

My question is more about the query.  Why is it taking so long?
 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
Reply
#6

@makif,

Are you using AWS? What version of CI? Database?
Reply
#7

(03-28-2019, 06:34 AM)php_rocs Wrote: @makif,

Are you using AWS? What version of CI? Database?

i am using nginx, also apache 2.4 at another place  for testing
CI version is 3.1.8
database mariadb 10.3.12
Reply




Theme © iAndrew 2016 - Forum software by © MyBB