> Dnia piątek, 4 maja 2012 15:01:39 Roberto De Ioris pisze:
>> Il giorno 04/mag/2012, alle ore 14:28, Łukasz Mierzwa ha scritto:
>> > Dnia środa, 2 maja 2012 15:32:32 Łukasz Mierzwa pisze:
>> >> Dnia środa, 2 maja 2012 11:41:04 Łukasz Mierzwa pisze:
>> >>> Since there is now uWSGI option to run any command at worker exit, I
>> had
>> >>> to
>> >>> write very simple patch that adds this. There is no way to run that
>> >>> command
>> >>> as root since this is done after privileges drop so the command is
>> being
>> >>> run as user (unless someone runs workers as root user).
>> >>>
>> >>> Does this patch qualifies for merging into uWSGI?
>> >>
>> >> It turns out that I need to make another patch, with this one
>> >> exec-as-user-
>> >> atexit would be executed at each worker shutdown, and I need to
>> execute
>> >> it
>> >> only at master exit.
>> >
>> > This patch works for me, I can execute command at app shutdown and
>> emperor
>> > reload.
>
> I've noticed one issue with my current setup (MooseFS mounted inside
> namespace) - requests for static files are hanging sometimes and in logs I
> see
> a lot of:
>
> May 4 17:46:41 localhost app1: fstat(): Bad file descriptor [sendfile.c
> line
> 17]
> May 4 17:47:37 localhost app1: {address space usage: 943919104
> bytes/900MB}
> {rss usage: 136712192 bytes/130MB} [pid: 28|app: -1|req: -1/9] () {46
> vars in
> 981 bytes} [Fri May 4 17:47:37 2012] GET /asset
> s/packages/mp_wszystkie-d2637e99dffbb62fecf25d155238af74.jpg => generated
> 0
> bytes in 1 msecs via offload() (HTTP/1.1 -30) 0 headers in 0 bytes (0
> switches
> on core 0)
>
> This only happens with static-offload-to-thread enabled in my vassal
> config,
> disabling static-offload-to-thread fixes my issue.
> I will try to debug this issue a little more, so far it seems to be
> triggered
> by a lot of concurrent requests for static files.
> Files that are being served are stored both locally on disk
> (public/index.html for example - I've seen issue with / requests) and on
> MooseFS share (mostly compiled assets), so it seems that this is not
> MooseFS
> related.
It should be fixed in latest tip (a missing \0 in the filename managed by
the offloaded thread)
Thanks
--
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi