Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grails Spring Security Slow Startup

Environment :

Intel Core 2 duo, 3 gig RAM
Ubuntu 9.10, Grails 1.3.5, Spring security plugin 1.1.2
JVM Parameters : -Xms512m  -Xmx1024m  -XX:MaxPermSize=512m  

Starting an application that uses the grails spring security plugin is very slow. I found this reported here. The work around suggests setting the anonymous key as that seems to be the slow down due to SecureRandom - "set a key manually using " .

I set this within Config.groovy to no avail.

grails.plugins.springsecurity.anonymous.key="someuniquekey"

Where a number was used for someuniquekey. It still takes forever (~30 seconds) to get past the Configuring Spring Security... message.

Any ideas? Am I setting this in the wrong place or the wrong way?

Thanks, Steve

like image 708
ptsw Avatar asked Mar 03 '11 16:03

ptsw


2 Answers

By 22 Miscellaneous Properties

http://burtbeckwith.github.com/grails-spring-security-core/docs/manual/guide/single.html

the key should be

grails.plugins.springsecurity.anon.key

But I try it, even not no change after set.

like image 88
user558987 Avatar answered Oct 02 '22 07:10

user558987


You can set the next var in Config.groovy

environments.development.searchable.bulkIndexOnStartup = false
like image 30
Fran García Avatar answered Oct 02 '22 09:10

Fran García