monroewlkr29
New Member
- Messages
- 1
- Reaction score
- 0
- Points
- 0
I'm trying to create a chat page, and the only way I know how is with long polling. The script is set up to check a mysql database to see if there are newer messages, and if not, wait 500 milliseconds and continue. I was working on it last night and got a resource limit reached message.
In the original script, I had forgotten to put a usleep function, so the loop was going pretty fast. Is that why I hit the resource limit, or is it just long polling?
I know it's not your responsibility to, but do you know of a better way to do a chat system?
edit:
also, is there a way to check the current amount of cpu time used?
edit 2:
So I've found the 1h statistics, but I can't really make sense of them.
In the original script, I had forgotten to put a usleep function, so the loop was going pretty fast. Is that why I hit the resource limit, or is it just long polling?
I know it's not your responsibility to, but do you know of a better way to do a chat system?
edit:
also, is there a way to check the current amount of cpu time used?
edit 2:
So I've found the 1h statistics, but I can't really make sense of them.
Last edited: