Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Jack Bakker
user to usergroup associations being lost in database
July 24, 2012 10:15 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 641

Join Date: January 3, 2010

Recent Posts

Liferay CE 6.0.6 ; postgresql 8.4 ; import from Active Directory on login only (not on interval or on startup)

I have a sql script running every hour that checks if a test user is associated with a usergroup in the postgresql database ; the user mysteriously gets dissassociated from the usergroup seemingly at random ; this is happening with many user/usergroup associations ; on login, the user is associated again but then mysteriously the database gets updated at some point where the association is lost

what event could be causing this ?
David H Nebinger
RE: user to usergroup associations being lost in database
July 24, 2012 10:47 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7250

Join Date: September 1, 2006

Recent Posts

You could add model listeners in order to find out if it's being done on the Liferay side... If it's done on the database side, it's probably up to you to track down...
Hitoshi Ozawa
RE: user to usergroup associations being lost in database
July 24, 2012 3:55 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

Seems to be connection pool timeout. Liferay updates the memory cache and then flushes the memory cache to a database. I think your connection pool is timing out so the data is updated to the memory cache but not to the database.
Jack Bakker
RE: user to usergroup associations being lost in database
July 24, 2012 4:20 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 641

Join Date: January 3, 2010

Recent Posts

thanks Hitoshi

any ideas/posts on how to determine best config ?

http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Properties+6.0.5#section-Portal+Properties+6.0.5-JDBC
Hitoshi Ozawa
RE: user to usergroup associations being lost in database
July 24, 2012 4:32 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

Sorry, no. It's dependent on the environment. I remember having to set it to a large value when my liferay and database were in a different segment. I think the switch was timing out the sessions. This is another reason to use Apache http server upfront - to keep liferay and database in a same segment.
Jack Bakker
RE: user to usergroup associations being lost in database
July 24, 2012 4:36 PM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 641

Join Date: January 3, 2010

Recent Posts

got apache in front (there is no other way really)

what do you mean by 'it' being set to a large value ; I think you are onto something here for me
Jack Bakker
RE: user to usergroup associations being lost in database
July 25, 2012 5:22 AM
Answer

Jack Bakker

Rank: Liferay Master

Posts: 641

Join Date: January 3, 2010

Recent Posts

I guess it is time for me to get to know c3p0 better

http://www.liferay.com/community/wiki/-/wiki/Main/Portal+Properties+6.0.5#section-Portal+Properties+6.0.5-JDBC

http://www.mchange.com/projects/c3p0/index.html#configuration