What would be the reason incur session_start start slow

Source: Internet
Author: User
What causes the Session_Start to start slowly.
PHP starts session_start very slowly for the first time. (Wait several minutes)


After the client has generated the PHPSESSID cookie, the access speed returns to normal.
After the PHPSESSID cookie is removed, it is very slow to open and then returns to normal when the PHPSESSID is completed for the first time.

Just two lines of code:

Session_Start ();
Phpinfo ();

?>

What causes Session_Start to start so slowly for the first time?
There are a lot of places to find out why ...


------Solution--------------------
First???
Again, huh?
------Solution--------------------
Not met, use a few browser test to see.
------Solution--------------------
4.6 min?... Nes Nous ....
------Solution--------------------
Do not know this article can solve your problem no:
Http://www.daimami.com/operating-system/501202.html
------Solution--------------------
Quote the manual on that don't know right topic
Reference
There is some posts around about session_start () beeing terribly slow on NTFS. For me the problem O Ccured from one day to another, system is already running fine for 2 years.
To get around it implementing a custom Session_set_save_handler could is an option, although for me it worked just to put A session_write_close () somewhere near the end of my script. (maybe IIS didn ' t kill the php-threads fast enough?!)

------Solution--------------------
Continue to be related to "slow" in the manual:

A Note on the Windows installations with an NTFS file structure:

Make sure give your Internet user account (usually IUSR_machinename) "Modify" access to the Session.save_path Director Y. Otherwise session_start () would silently-and Oh, so slowly-fail.

("Modify" is a win2k term, but the concept translates to older IIS installs).
------Solution--------------------
Reference:
php started session_start very slowly for the first time. (Wait several minutes)


After the client has generated the PHPSESSID cookie, the access speed returns to normal.
After the PHPSESSID cookie is removed, it is very slow to open and then returns to normal when the PHPSESSID is completed for the first time.

Just two lines of code:

Session_Start ();
Phpinfo ();

?>

It will
be ...
The same code I tested under Linux does not have this condition.
So you should consider the problem of Windows, not the PHP problem.
------Solution--------------------
If you have this problem with Linux, then it is easier to install a MRTG to detect the use of Cpu,io, disk, memory and so on, so that you can learn exactly where this is causing the problem to occur.
------Solution--------------------
Re-compile or change the version?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.