Session Is Beeing Destroyed When "lifetime" Is Set

Ive got problems with proper setup of sessions : /

in my config.main




'session'=>array(

   'class' => 'CDbHttpSession',

   	      'connectionID' => 'db',

   	      'sessionTableName' => 'sessions',

              'sessionName' => 'xxx',

    	      'cookieMode' => 'only',

    	      'cookieParams' => array('lifetime' => 60),

        ),

        'user'=>array(

	      'allowAutoLogin'=>true,

	      'autoRenewCookie'=>true,

	),



As you can see session related data is stored in table "sessions". Im putting there other user-related data - from obvious reasons.

Case is:

When cookie with session id expires (after 60 sec according to config.main), session reader handler (CDbHttpSession/readSession()) wont find record in database. And that behavior is perfectly correct. Old cookie with session_id lost its validity and new session_id is not present in db. In that situation CWebUser/restoreFromCookie() will also be called and session data is restored - but only that data that was stored in identity cookie. Data that was previously in database is lost!!

Ive noticed that once cookie with session_id is created its expiration date is never extended.

I know that I can extend lifetime so cookie is valid for let say one month but after that time, even if user is constantly active, he will suddenly be log out from service.

My question is:

Am I messing with setting? Maybe I forgot to set sth?

Extending validity of cookie with session_id each time user is refreshing site would solve my problem.

Maybe it can be set somewhere …

Thanks for comments : )