Welcome Guest, Not a member yet? Register   Sign In
current browser always loading until other tab process finish

(This post was last modified: 07-25-2018, 04:34 PM by plonknimbuzz.)

hi, guys

i was using CI since 5-6 years ago

if i remember, when i update CI 2.x to CI 3.x i face this problem, until now. But because this problem can solve by using incognito mode or another browser , i ignore this.

But, sometimes i want to know what exactly happened here. My coding failure, or miss configuration or missunderstood the CI workflow.

here my problem.
i have 8 different apps (totally different), and all of them using CI 3.1.8 - 3.1.9

all of them have function that execute long running process (2 min)
lets say controller Test/longrun
- parse JSON
- check DB
- if not exists. insert
Note: this problem only happened when i execute long running process with database CRUD. if i run long running script which dont have any db activity (like: loop sleep(1) 1000 times), this problem will not occur/happen

and i have simple script: (1 sec)
- select id from table limit 1 (only just 1)
- echo id

helper: url
library: database, session
session type: file

dbms: sql server, mysql and maria db (all have same test result)

method: ajax and common html form submit (all have same test result)

my testing:
1. firefox: Tab A: example.com/home/longrunning and start the script. expect done in 2 min 
2. firefox: Tab B: after execute tab A, i want to  open example.com/home/simpleEcho in another tab, which expect done in 1 sec. But this only execute when tab A / long running process is finished
3. firefox: phpmyadmin : i execute several commands/action while Tab A still on progess. and it works normally
4. firefox: youtube : youtube detect my connection as Full HD quality while Tab A still on progress. This is to make sure i have good connection
5. firefox: Tab B: open another apps and execute long running process while Tab A still on progress. and this works normally too
6. firefox incognito: i open simpleEcho, and it done in no time (< 1 sec) while no 1 is running in normal Tab
7. chrome: i open simpleEcho, and it done in no time too. while no 1 is running in normal firefox
8. different PC: run in no time too. while another pc is running process no 1
9. mobile: run in no time too. while another pc is running process no 1

- no bandwith issue
- no database issue : because im able to execute commands/action using phpmyadmin or even from another db client remotely while long running process still on progress
- no apps issue: because i was able to execute simpleEcho using another device or even in same device with incognito/different browser

the possible reason is the SESSION. When i execute simple script in same session which is executed long running process, the simple script only executed when long running process was done. When i execute in different session using incognito, different browser or even different device, the simple script is immediately executed.

i dont know what exactly happen. even i have 1 really simple apps (for demo purpose) which only have 1 controllers and 5 method. this still happen
after wake up i will create simple apps from fresh CI to test this. and i will share the result with you guys.

if anybody here even have same problem, or have any suggestion about this, please let me know.
now im really sleepy to make testing. i will build simple testing after wake up later.


Note: sorry for my english . really bad  Heart

Seem likely you are experiencing a concurrency problem. As the documentation explains you might be able to solve the problem by using session_write_close().

Theme © iAndrew 2016 - Forum software by © MyBB