Il giorno 23/feb/2012, alle ore 22:57, Seamus Lawson ha scritto: > On Thu, Feb 23, 2012 at 2:33 PM, Roberto De Ioris <[email protected]> wrote: > > If i understand correctly you would like your instances to brutally fail > if your app cannot be loaded. In lazy mode, that means worker respawning > constantly. (Being controlled by the anti-fork-bombing policy). There is > no problem in adding such an option, but it cannot be the default as > loading multiple apps in uWSGI is a common practice, and users do not want > a single app taking down all of the others ;) > > Can you clarify what difference lazy mode makes here? If there's a workaround > that involves not using lazy mode, we'd consider it. (Lazy mode is being used > to avoid sharing memcache and DB connections among workers vs implementing > the post_fork_hook.) > > Fork-bombing is obviously something one would want to avoid, but rate-limited > recycling would be very useful, near essential. > > -Seamus > _______________________________________________ >
Hi, in 1.1-snapshot9 (or latest tip), you will find 2 new options: --need-app (if no app can be loaded it will exit) --forkbomb-delay <n> (sleep for specified, default 2, number of seconds during fork bomb) --need-app is dependent from the fork() configuration: In default mode (the master loading the applications) uWSGI will simply exit with code 22 (app failed). In lazy mode, the master will detect the code 22 and will respawn the processes until they fully load at least one app. -- Roberto De Ioris http://unbit.it JID: [email protected] _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
