A permanently running PHP script sleep

Source: Internet
Author: User
A permanently running PHP script sleep php sleep

I have read the post I asked to determine whether only one permanent running script is running.

Now I want to ask sleep () for 1 second
Sleep () 10 seconds
Sleep () 1 minute
Sleep () half an hour
Sleep () one hour

The difference in time has a significant impact on the server pressure and memory usage. only one of them is running, and then the running will judge whether there is a running


Reply to discussion (solution)

Sleep is used to suspend a running php program and is obviously not suitable for web applications.
Since the php program is suspended, it will not increase or decrease the memory usage.

Sleep is used to suspend a running php program and is obviously not suitable for web applications.
Since the php program is suspended, it will not increase or decrease the memory usage.
This is much better. it was originally intended to sleep for half an hour, but it would be too much trouble to verify that it is already running.

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.