Re: php session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, June 14, 2005 7:02 am, balwantsingh said:
> i have made a script where we have mounted one directory of webserver to
> another directory of a system.
> the php script runs in every 2 min. with the help of cronjob and insert
> all the data of the directory in mysql.
> the problem comes now when the link between above two systems breaks &
> php is doing its job i.e. loading data into mysql, the php session is
> hanged and consumes lot of memory and hence increase the load of websever.
> is there any way so that php session killed itself if it is hanged in
> between or any other workaround so that load is not increased.

Figure out why the PHP job is hanging in the first place and fix it, is
the best answer...

In the meantime, have root run a cron job that "kill -9" your PHP job if
it has been running longer than X minutes, or even if it has not done an
INSERT in Y minutes or...

It's up to you to determine the criteria for just killing off the process.

Just be sure you don't end up killing something in a bad half-finished
state that will corrupt your application data.

You may want to have your PHP job log more stuff about what it is doing
step by step so you can figure out why/when it hangs.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux