The nginx-php program uses the session mechanism to control user logon and deprecation, but the page response speed is very slow. What should I do?

Source: Internet
Author: User
The php program uses the session mechanism to control user logon and deprecation. However, the page response speed is very slow (3 s), and fastcgi_cache (Nginx server) cannot be used ), how should we speed up this time? This is a headache. Every time you open a page, it takes 3 s-5 s... the php program uses the session mechanism to control user logon and deprecation. However, the page response speed is very slow (3 s), and fastcgi_cache (Nginx server) cannot be used ), how should we speed up this time?

This is a headache. It takes 3 s-5 s to open a page. Solution ~

Reply content:

The php program uses the session mechanism to control user logon and deprecation. However, the page response speed is very slow (3 s), and fastcgi_cache (Nginx server) cannot be used ), how should we speed up this time?

This is a headache. It takes 3 s-5 s to open a page. Solution ~

The page response speed may not be caused by the session,
1. Check whether the database query has performance problems, such as the long-term cpu elevation of the database.
2. Is the overall server performance low and the memory is insufficient?
3. Is the cpu too high because there are too many users?

If all of the above can be ruled out and the problem is confirmed to be a session, you can try to use memcached to cache the session.

Session card
Check hard disk read/write
Check whether session lock is detected in slow logs.

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.