Page 1 of 1

PHP Background Process+ Socket

Posted: Sat Jun 12, 2010 4:03 am
by kirank
Hi,

I wanna clarify one issue with my code.
I have connection to remote sms gateways from my application. I am connecting full time to the gateway through an infinitely executing script in background. I have more than 10 connections.

What i have done is, created program and run the code in php cli. So there was more than 10 process running 24 hours connecting to a remote server wih fsockopen. ie more tan 10 instance of same program with differnt paramters . THe script executes continuously in while loop and given some delay in iteraions to avoid cpu issues. Then the fsockopen works for 2-3 hours and after that before calling the fclose, it autmatically close connection. I am not able to use fread function from socket connection. I have 2 mbps connection with Dedicated Server Environemnt. Why this issue happens. All proces use seperate mysql connection to same tables.

What may be the reason for the issue. From the explnation what do you feel regarding the application. and how can i improove it.


Thanks

Re: PHP Background Process+ Socket

Posted: Mon Jun 14, 2010 12:38 am
by kirank
Hi,
Please help me on this issue. I am stuck with my development !
Thanks