Hi! I am writing a chat program with php and mysql using semaphores, shared memory and sessions. Chatters A and B will both be using a common file where semaphores are acquired in a while loop. To my grief, the chatting was found to hang at around 50 mins mostly, though other instances of 9 or 20 mins have occurred too. I tracked it down and found that semaphore id gotten using sem_get(2000, 1) will be around 40989 (the max so far). Then the program cannot proceeds because it stucks at sem_get. It just cannot get past that and that causes my connection to mysql processes to sleep when I do a show processlist. Then it hangs the web server because any new connection to mysql will go to sleep mode. The httpd processes can go up to 100 and mysql processes are still quite small like 8. shm_attach(2000, 524288) was used. Didn't sem_release or sem_remove causes the semaphore id gotten using sem_get to be reusable? Why the number keeps jumping and finally dies @ around 40989? Is there a way to increase the semaphore id gotten using sem_get to prolong the lifespan of the program? Or should I copy the php file so that each chatter has its own php file to run? Please advice. Thankyou. Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]