> Hi,
>
> I have an psgi app and I want to have a mule which will perform periodic
> housekeeping.
>
> Straightforward approach, like:
>
> $ uwsgi --http-socket :8080 -M --mule=mule.pl --psgi=psgi.pl
>
> in general does what I want, but... the problem is that
> postfork()/atexit() hooks in psgi.pl are executed also for mule.pl:
>
> spawned uWSGI master process (pid: 10371)
> spawned uWSGI worker 1 (pid: 10372, cores: 1)
> spawned uWSGI mule 1 (pid: 10373)
> [10372]: postfork(1)
> [10373]: postfork(0)
> 10373: Mule loaded
> ...
> ^CSIGINT/SIGQUIT received...killing workers...
> Signal SIGINT received, but no signal handler set.
> [10373]: atexit(0)
> [10372]: atexit(1)
>
> uwsgi::postfork()/atexit

>
> Besides, when starting a (perl) mule, Devel::StackTrace is referenced
> but not use(ed), thus preventing stack trace generation on exceptions:
>
> [10456]: postfork(1)
> [10457]: postfork(0)
> 10457: Mule loaded
> Can't locate object method "new" via package "Devel::StackTrace"
> (perhaps you forgot to load "Devel::StackTrace"?) at (eval 14) line 1.
> [10457]: atexit(0)
>
> this happens when mule.pl dies on any error - 1/0 in this case - which
> is invisible unless I "use Devel::StackTrace" in mule.pl
>
> Thank you for listening :)
>

this (iirc) should be already improved in 2.1, but in the stable branch,
adding "use Devel::Stacktrace" is the best approach (unless you want to
disable completely devel-stacktrace)


Regards

-- 
Roberto De Ioris
http://unbit.com
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to