Time out initial update database

General discussion about netjukebox
Post Reply
leendersj
User
Posts: 3
Joined: Wed Apr 12, 2006 5:39 pm
Location: Netherlands

Time out initial update database

Post by leendersj »

Hello,

updating my mp'3's (70,000 pcs) times out, no errors.
I've increased all the timeout settings (http, scripts) in iis I know, even modified the metabase.xml file (from the default cgitimeout of 300 to 36000 sec.). The last change increased the timeout from 5 minutes to approx. 1 hour.

When I update a part off the files everything goes well.

Updating on the server or from a client makes no difference.

Any hints?

I'm using
windows 2k3 st sp1
iis 6
php 5.0.4
mysql 4.1.10
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

You have a lot of Music ;-)
It could be that the browser timed out.

The update script itself can run for 1 hour.
See line 29 of update.php:

Code: Select all

ini_set('max_execution_time', '3600');
Cut and past from the php manual:
max_execution_time integer
This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser
....
You can not change this setting with ini_set() when running in safe mode.
The only workaround is to turn off safe mode or by changing the time limit in the php.ini.
Updating takes relative long when run for the first time.
The files that are updated, will only be updated again if the "file modification time" has changed.
So the next run will be much faster.
It is no problem to start the update over for a few times.
leendersj
User
Posts: 3
Joined: Wed Apr 12, 2006 5:39 pm
Location: Netherlands

Post by leendersj »

Thanks for the quick responce,

Yes a lot off music,
i share them with my friens and family with andromeda, but searching for a song takes minutes.
Searching internet for a database driven solution brought me to NJB.


I modified the 'max_execution_time' in update.php to 7200.
This solfed my "problem", no timeout after 1 hour.

Updating multiple times was another option, but the standaard cgitimeout for iis 6 is 5 minutes, so i should update over 20 times.
Being a "lazy" sysadmin, this should work by 1 mouseclick :wink:
andersen
User
Posts: 16
Joined: Thu Apr 13, 2006 3:02 pm

Post by andersen »

May I know,

The netjukebox did not automatic logout or timeout when it not uses for long time. or even re-start the system, user still not logout yet.

Could you please help me this?

Thank you Very much.
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

andersen wrote:May I know,

The netjukebox did not automatic logout or timeout when it not uses for long time. or even re-start the system, user still not logout yet.

Could you please help me this?

Thank you Very much.
When login a cookie is set.
So even when resetting the computer you will stay logged in.
You can very quickly logout on the bottom of the page.

But if you want to expire the login more quickly, you can change the
$cfg['authenticate_expire'] value in config.inc.php.
Expire login after 10 minutes idle time:

Code: Select all

$cfg['authenticate_expire']         = 600;
If you are extremely paranoia you can set the cookies as a session cookie.
Than login will expire after the time you have set above and when closing the browser.
A big disadvantage is that all "Session profile" setting will be lost after closing the browser.

Code: Select all

$cfg['cookie_lifetime']             = 0;
andersen
User
Posts: 16
Joined: Thu Apr 13, 2006 3:02 pm

Post by andersen »

Thanks! for help this... No wonder. below is the default

// +---------------------------------------------------------------------------+
// | Cookie |
// +---------------------------------------------------------------------------+
$cfg['cookie_lifetime'] = 2114377200;
$cfg['cookie_expire'] = time() - 3600 * 24 * 365;



// +---------------------------------------------------------------------------+
// | Authenticate |
// +---------------------------------------------------------------------------+
$cfg['authenticate_anonymous_user'] = 'guest';
$cfg['authenticate_expire'] = 3600 * 24 * 7;
?>


So I just change to below
$cfg['authenticate_expire'] = 600;

If I just want to expire it for 10 minutes.

So How about the cookies?
If I just want if they close the browser or restart, they have to re-login again....

(I want is If they are on Downloading, the jukebox will NOT expire.)
User avatar
wbartels
netjukebox developer
Posts: 881
Joined: Thu Nov 04, 2004 3:12 pm
Location: Netherlands
Contact:

Post by wbartels »

andersen wrote:So How about the cookies?
If I just want if they close the browser or restart, they have to re-login again....
I wouldn't advice to change the $cfg['cookie_lifetime'] see disadvantage above.
andersen wrote:(I want is If they are on Downloading, the jukebox will NOT expire.)
The validation is done at the begin of the script.
So you can download longer than the expire time.
When download longer than the expire time and don't use netjukebox in the meantime than you have to login again.
andersen
User
Posts: 16
Joined: Thu Apr 13, 2006 3:02 pm

Post by andersen »

I see... Thanks. It work, and I just left the cookies setting as default ;)
Post Reply