CodeIgniter Forums
Session and long polling - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Session and long polling (/showthread.php?tid=64833)



Session and long polling - matrox445 - 03-31-2016

Hello,

I've just update my app from CI 2.2 to CI 3.0.6. By the way, thanks for keeping CI alive !
Everything work fine, except pages with long polling.
 
Here's how i test it : 

Load a page. Launch a long polling (xhr) for 30 seconds. Try to reload the page. The page will refresh only at the end of the long polling call. 

Log of the first load :

Code:
Loading Time: Base Classes   0.0171
Controller Execution Time 0.0469
Total Execution Time          0.0647

Log of the refresh :

Code:
Loading Time: Base Classes   0.0172
Controller Execution Time       29.0245
Total Execution Time          29.0424

The problem seems to be this request :

28.9773  SELECT GET_LOCK('bfa50f3e52f4ed5967e97e0fe5120bb7bfbc1da2', 300) AS ci_session_lock, where query time is always the long polling remaining time.

I use database sessions. It was working fine with CI 2.2.

Sorry for my english, hope you will understand my problem...

Regards


RE: Session and long polling - Avenirer - 03-31-2016

I guess this thread can help you... http://forum.codeigniter.com/thread-61889.html


RE: Session and long polling - matrox445 - 03-31-2016

(03-31-2016, 07:13 AM)Avenirer Wrote: I guess this thread can help you... http://forum.codeigniter.com/thread-61889.html

Ok, it seems to work ! Thank you Smile


RE: Session and long polling - matrox445 - 04-01-2016

I find a note in the user guide : https://www.codeigniter.com/user_guide/libraries/sessions.html#a-note-about-concurrency
Next time i'll be more attentive...